summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Lee <john_lee@openmoko.org>2008-12-22 14:17:22 +0800
committerJohn Lee <john_lee@openmoko.org>2008-12-22 14:27:24 +0800
commit9280ba1f0ba54dc18a6989b59d85e17dee6b805e (patch)
tree4cc6d2546a2f77e41350df6c54ce2fb9a93b1095
parentec0251360e5d8e5c52f53338befe4eac3ffddd8d (diff)
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 <hsw@openmoko.com>
-rw-r--r--classes/update-rc.d.bbclass7
1 files changed, 6 insertions, 1 deletions
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
}