update-rc.d.bbclass: check that init script is executable before running it

Check that the init script that is going to be called in the prerm()
script really exists and is executable. There might be a packaging bug
or the script might've been removed already earlier in prerm().

[YOCTO #10299]

(From OE-Core rev: aabb87c9dbd60fe9467ca0354ec05c275a3f1b1a)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Markus Lehtonen 2016-10-06 16:37:04 +03:00 committed by Richard Purdie
parent 35362715b1
commit ac647ea696
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ fi
}
updatercd_prerm() {
if [ -z "$D" ]; then
if [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
${INIT_D_DIR}/${INITSCRIPT_NAME} stop
fi
}