[oe-commits] [openembedded-core] 03/04: update-rc.d.bbclass: ignore init script return code
git at git.openembedded.org
git at git.openembedded.org
Tue Oct 11 21:19:58 UTC 2016
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit daa3c266a7ffa060b52381fa00df518102fceda8
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Tue Oct 11 15:43:28 2016 +0300
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]
Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/update-rc.d.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 348f3c0..321924b 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"
updatercd_preinst() {
if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
- ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
+ ${INIT_D_DIR}/${INITSCRIPT_NAME} stop || :
fi
if type update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
@@ -38,7 +38,7 @@ fi
updatercd_prerm() {
if [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
- ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
+ ${INIT_D_DIR}/${INITSCRIPT_NAME} stop || :
fi
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list