]> code.ossystems Code Review - openembedded-core.git/commitdiff
update-rc.d.bbclass: check that init script is executable before running it
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 6 Oct 2016 13:37:04 +0000 (16:37 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 7 Oct 2016 15:53:15 +0000 (16:53 +0100)
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>
meta/classes/update-rc.d.bbclass

index dfef2a2fd6d234339e882fd248168ad82328d781..348f3c0962acf7badbf2abb36a75a8a0c47b34c2 100644 (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
 }