aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2013-01-17 20:56:38 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-18 13:10:32 +0000
commitdeb8ac868a989f41c0664312a5fb855358be2296 (patch)
treebe97defa4b6a6c65da55f663c289e71ae8cbc431
parent5a404ba472c51cec8e13d79e073a1d104a747c44 (diff)
downloadopenembedded-core-contrib-deb8ac868a989f41c0664312a5fb855358be2296.tar.gz
update-rc.d:fix support postrm at image creation time
updatercd_postrm failed at image creation time because "-f -r ${D}" is not used as update-rc.d's option. [YOCTO #3633] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/update-rc.d.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 33642691671..83816d6ad69 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -28,7 +28,11 @@ fi
}
updatercd_postrm() {
-update-rc.d $D ${INITSCRIPT_NAME} remove
+if [ "$D" != "" ]; then
+ update-rc.d -f -r $D ${INITSCRIPT_NAME} remove
+else
+ update-rc.d ${INITSCRIPT_NAME} remove
+fi
}