Patchwork [2/4] update-rc.d:fix support postrm at image creation time

login
register
mail settings
Submitter Hongxu Jia
Date Jan. 17, 2013, 12:56 p.m.
Message ID <68cbbc6c0e944c842f603609e5b40ebb5f7001fc.1358427029.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/42799/
State New
Headers show

Comments

Hongxu Jia - Jan. 17, 2013, 12:56 p.m.
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>
---
 meta/classes/update-rc.d.bbclass |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 3364269..83816d6 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
 }