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

Hongxu Jia
2013-01-17T07:22:51Z

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(-)

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
}

--
1.7.10.4