[oe-commits] [openembedded-core] 04/04: sysklogd and busybox: ignore return code from init script stop

git at git.openembedded.org git at git.openembedded.org
Tue Oct 11 21:19:59 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 806a910927f479207d47b06c20a0497e91203266
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Tue Oct 11 15:43:29 2016 +0300

    sysklogd and busybox: ignore return code from init script stop
    
    The init script will return '1' if we try to stop the service and it is
    not currently running. The prerm scriptlet must not fail because of this
    because it will cause package deinstallation of upgrade fail if opkg
    package manager is used.
    
    [YOCTO #10299]
    
    Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-core/busybox/busybox.inc       | 2 +-
 meta/recipes-extended/sysklogd/sysklogd.inc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index f67bbbc..b2f1960 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -423,7 +423,7 @@ pkg_prerm_${PN}-syslog () {
 	# remove syslog
 	if test "x$D" = "x"; then
 		if test "$1" = "upgrade" -o "$1" = "remove"; then
-			${sysconfdir}/init.d/syslog stop
+			${sysconfdir}/init.d/syslog stop || :
 		fi
 	fi
 }
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index 1e363db..5c15ffe 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -55,7 +55,7 @@ ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
 pkg_prerm_${PN} () {
 	if test "x$D" = "x"; then
 	if test "$1" = "upgrade" -o "$1" = "remove"; then
-		/etc/init.d/syslog stop
+		/etc/init.d/syslog stop || :
 	fi
 	fi
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list