From 9280ba1f0ba54dc18a6989b59d85e17dee6b805e Mon Sep 17 00:00:00 2001 From: John Lee Date: Mon, 22 Dec 2008 14:17:22 +0800 Subject: update-rc.d.bbclass: honor $D as well in updatercd_postrm Without this, postrm script will try to remove service on the host system in a toolchain environment. Patch created by Christopher Hall --- classes/update-rc.d.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/update-rc.d.bbclass b/classes/update-rc.d.bbclass index 9b832c0012..6328193bb9 100644 --- a/classes/update-rc.d.bbclass +++ b/classes/update-rc.d.bbclass @@ -21,7 +21,12 @@ fi } updatercd_postrm() { -update-rc.d $D ${INITSCRIPT_NAME} remove +if test "x$D" != "x"; then + OPT="-r $D" +else + OPT="" +fi +update-rc.d $OPT ${INITSCRIPT_NAME} remove } -- cgit v1.2.3