From: John Lee Date: Mon, 22 Dec 2008 06:17:22 +0000 (+0800) Subject: update-rc.d.bbclass: honor $D as well in updatercd_postrm X-Git-Tag: Release-2010-05/1~4689 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9280ba1f0ba54dc18a6989b59d85e17dee6b805e;p=openembedded.git 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 --- 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 }