summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-10-06 16:37:04 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-07 16:53:15 +0100
commitaabb87c9dbd60fe9467ca0354ec05c275a3f1b1a (patch)
treed005788f3faf2127df376aa698b8fb1c5e46c64b
parent9007e0e3fce7e09b043fead54b17f69c1661d162 (diff)
downloadopenembedded-core-contrib-aabb87c9dbd60fe9467ca0354ec05c275a3f1b1a.tar.gz
openembedded-core-contrib-aabb87c9dbd60fe9467ca0354ec05c275a3f1b1a.tar.bz2
openembedded-core-contrib-aabb87c9dbd60fe9467ca0354ec05c275a3f1b1a.zip
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] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/update-rc.d.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index dfef2a2fd6..348f3c0962 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -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
}