Skip to contentSkip to conversation

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

PATCH New Markus Lehtonen 1 participant 1 message Oct 6, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 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]

---
 meta/classes/update-rc.d.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/update-rc.d.bbclass +1 -1
index dfef2a2..348f3c0 100644
@@ -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
 }
Signature · 1 line
2.6.6