[source] base-files: ignore failure of stopping services on removal

LEDE Commits lede-commits at lists.infradead.org
Mon Nov 21 09:41:57 PST 2016


jogo pushed a commit to source.git, branch master:
https://git.lede-project.org/48cfc826ebc9242c493ddbca484bbee36ba74b93

commit 48cfc826ebc9242c493ddbca484bbee36ba74b93
Author: Jonas Gorski <jonas.gorski at gmail.com>
AuthorDate: Mon Nov 21 15:47:48 2016 +0100

    base-files: ignore failure of stopping services on removal
    
    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 at gmail.com>
    Acked-by: Jo-Philipp Wich <jo at mein.io>
---
 package/base-files/files/lib/functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index a5838f6..b3bf221 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -178,7 +178,7 @@ default_prerm() {
 			if [ "$PKG_UPGRADE" != "1" ]; then
 				"$i" disable
 			fi
-			"$i" stop
+			"$i" stop || /bin/true
 		fi
 	done
 }



More information about the lede-commits mailing list