update-rc.d: use '-f' option in updatercd_postrm

Use '-f' ('--force') option so that while removing packages using deb,
we don't fail because of the following error:

   update-rc.d: $initd/$bn exists during rc.d purge (use -f to force)

Using '-f' option would make this a warning but continue to execute.

   update-rc.d: $initd/$bn exists during rc.d purge (continuing)

We need this option because dpkg package backend have special handling for
configuration files. And if files under /etc/init.d are treated as configuration
files, we will have errors.

(From OE-Core rev: ebb2d557bbf410d98040cdaabbddd7e3ee0a9709)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chen Qi 2015-02-17 10:08:14 +08:00 committed by Richard Purdie
parent aa48c4ff4a
commit 3d7c798dff
1 changed files with 2 additions and 2 deletions

View File

@ -48,9 +48,9 @@ fi
updatercd_postrm() {
if type update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-r $D"
OPT="-f -r $D"
else
OPT=""
OPT="-f"
fi
update-rc.d $OPT ${INITSCRIPT_NAME} remove
fi