From: Jo-Philipp Wich Date: Tue, 9 Dec 2008 00:03:08 +0000 (+0000) Subject: prevent package upgrade failures caused by sloppy postinstalls X-Git-Tag: 0.9.0~912 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f7a3e34955fdcf9678fd0a5e18c8b06b6fc6b244;p=oweals%2Fluci.git prevent package upgrade failures caused by sloppy postinstalls --- diff --git a/applications/luci-splash/ipkg/postinst b/applications/luci-splash/ipkg/postinst index 0a4ca74cb..f898ad162 100755 --- a/applications/luci-splash/ipkg/postinst +++ b/applications/luci-splash/ipkg/postinst @@ -1,7 +1,5 @@ #!/bin/sh [ -n "${IPKG_INSTROOT}" ] || { - /etc/init.d/luci_splash enable - - exit 0 + /etc/init.d/luci_splash enabled || /etc/init.d/luci_splash enable } diff --git a/applications/luci-statistics/ipkg/postinst b/applications/luci-statistics/ipkg/postinst index e69ae4726..8d52ec2d3 100755 --- a/applications/luci-statistics/ipkg/postinst +++ b/applications/luci-statistics/ipkg/postinst @@ -2,8 +2,6 @@ [ -n "${IPKG_INSTROOT}" ] || { ( . /etc/uci-defaults/luci-statistics ) && rm -f /etc/uci-defaults/luci-statistics - /etc/init.d/luci_statistics enable - /etc/init.d/collectd enable - - exit 0 + /etc/init.d/luci_statistics enabled || /etc/init.d/luci_statistics enable + /etc/init.d/collectd enabled || /etc/init.d/collectd enable } diff --git a/contrib/package/olsrd-luci/ipkg/postinst b/contrib/package/olsrd-luci/ipkg/postinst index cd38fcfaf..c96480c2e 100755 --- a/contrib/package/olsrd-luci/ipkg/postinst +++ b/contrib/package/olsrd-luci/ipkg/postinst @@ -1,7 +1,5 @@ #!/bin/sh [ -n "${IPKG_INSTROOT}" ] || { - /etc/init.d/olsrd enable - - exit 0 + /etc/init.d/olsrd enabled || /etc/init.d/olsrd enable } diff --git a/libs/lucittpd/ipkg/postinst b/libs/lucittpd/ipkg/postinst index 3c25ea664..d3890aa0e 100755 --- a/libs/lucittpd/ipkg/postinst +++ b/libs/lucittpd/ipkg/postinst @@ -1,6 +1,6 @@ #!/bin/sh [ -n "${IPKG_INSTROOT}" ] || { - /etc/init.d/lucittpd enable - /etc/init.d/lucittpd start + /etc/init.d/lucittpd enabled || /etc/init.d/lucittpd enable + /etc/init.d/lucittpd start || true } diff --git a/modules/admin-core/ipkg/postinst b/modules/admin-core/ipkg/postinst index a849819c6..b0293a71b 100755 --- a/modules/admin-core/ipkg/postinst +++ b/modules/admin-core/ipkg/postinst @@ -1,9 +1,7 @@ #!/bin/sh [ -n "${IPKG_INSTROOT}" ] || { - /etc/init.d/luci_fixtime enable - /etc/init.d/luci_ethers enable - /etc/init.d/luci_hosts enable - - exit 0 + /etc/init.d/luci_fixtime enabled || /etc/init.d/luci_fixtime enable + /etc/init.d/luci_ethers enabled || /etc/init.d/luci_ethers enable + /etc/init.d/luci_hosts enabled || /etc/init.d/luci_hosts enable }