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

login
register
mail settings
Submitter Hongxu Jia
Date Jan. 17, 2013, 7:07 a.m.
Message ID <3f91c7d76370be4aef24960dd6c16a28efdebe14.1358406049.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/42765/
State Accepted
Commit deb8ac868a989f41c0664312a5fb855358be2296
Headers show

Comments

Hongxu Jia - Jan. 17, 2013, 7:07 a.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
 }