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]

(From OE-Core rev: deb8ac868a989f41c0664312a5fb855358be2296)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Hongxu Jia 2013-01-17 20:56:38 +08:00 committed by Richard Purdie
parent fbfaefb7e9
commit ee5333b0bd
1 changed files with 5 additions and 1 deletions

View File

@ -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
}