]> code.ossystems Code Review - openembedded-core.git/commitdiff
sysklogd and busybox: ignore return code from init script stop
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 11 Oct 2016 12:43:29 +0000 (15:43 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Oct 2016 21:18:36 +0000 (22:18 +0100)
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@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/busybox/busybox.inc
meta/recipes-extended/sysklogd/sysklogd.inc

index f67bbbc420b1baa3a49dde366e9410288fcbcdf0..b2f196022631227b45f90eb6da1b477ce7b81939 100644 (file)
@@ -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
 }
index 1e363db6e8bccda561514302eb9ed3eba20e9600..5c15ffe8ab4d7eeb59a1290e56222604f36a8b55 100644 (file)
@@ -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
 }