base-files: ignore failure of stopping services on removal
authorJonas Gorski <jonas.gorski@gmail.com>
Mon, 21 Nov 2016 14:47:48 +0000 (15:47 +0100)
committerJonas Gorski <jonas.gorski@gmail.com>
Mon, 21 Nov 2016 17:40:15 +0000 (18:40 +0100)
Packages that do a killall <cmd> with the same name as the init script
will fail the prerm step when the service isn't running. Do make them
removable without having to restart the service, ignore the return code.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
package/base-files/files/lib/functions.sh

index a5838f6035cd5462a2fb51043885923ad261a2b3..b3bf2213f4122c044632d0d835f0bc92c2d61491 100755 (executable)
@@ -178,7 +178,7 @@ default_prerm() {
                        if [ "$PKG_UPGRADE" != "1" ]; then
                                "$i" disable
                        fi
-                       "$i" stop
+                       "$i" stop || /bin/true
                fi
        done
 }