summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-10-11 15:43:28 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-11 22:19:21 +0100
commit83e4e27246a33eccfc329086444eaa925ccb8499 (patch)
tree8abac83595916482027c62da63f98d4f3edf4c06 /meta
parenta003a929d009b5b360c5a050bd9d2b903df5acce (diff)
downloadpoky-83e4e27246a33eccfc329086444eaa925ccb8499.tar.gz
update-rc.d.bbclass: ignore init script return code
We need to ignore the return code from the init script 'stop' command in the preinst and prerm scriptlets. Otherwise package upgrade or deinstallation (at least when opkg is used) is likely to fail if the daemon is not running. That is because an init script possibly returns '1' if you try to stop a service that is not running which, in turn, causes the scriptlet to fail which, in turn, causes the package (de-)installation to fail. [YOCTO #10299] (From OE-Core rev: daa3c266a7ffa060b52381fa00df518102fceda8) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/update-rc.d.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 348f3c0962..321924bb3e 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -13,7 +13,7 @@ INIT_D_DIR = "${sysconfdir}/init.d"
13 13
14updatercd_preinst() { 14updatercd_preinst() {
15if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then 15if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
16 ${INIT_D_DIR}/${INITSCRIPT_NAME} stop 16 ${INIT_D_DIR}/${INITSCRIPT_NAME} stop || :
17fi 17fi
18if type update-rc.d >/dev/null 2>/dev/null; then 18if type update-rc.d >/dev/null 2>/dev/null; then
19 if [ -n "$D" ]; then 19 if [ -n "$D" ]; then
@@ -38,7 +38,7 @@ fi
38 38
39updatercd_prerm() { 39updatercd_prerm() {
40if [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then 40if [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
41 ${INIT_D_DIR}/${INITSCRIPT_NAME} stop 41 ${INIT_D_DIR}/${INITSCRIPT_NAME} stop || :
42fi 42fi
43} 43}
44 44