prevent package upgrade failures caused by sloppy postinstalls
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 9 Dec 2008 00:03:08 +0000 (00:03 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 9 Dec 2008 00:03:08 +0000 (00:03 +0000)
applications/luci-splash/ipkg/postinst
applications/luci-statistics/ipkg/postinst
contrib/package/olsrd-luci/ipkg/postinst
libs/lucittpd/ipkg/postinst
modules/admin-core/ipkg/postinst

index 0a4ca74cb7ab727eb235365c8ddff016a0576062..f898ad1620f530a4afe0834dc9b832d9b64d6a28 100755 (executable)
@@ -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
 }
index e69ae47266f3a78b80badc44353e2786b1a71506..8d52ec2d36d5c0e823fbf67ac2cf0a027980ea9c 100755 (executable)
@@ -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
 }
index cd38fcfaf01f2038247386a172a2ca2dd6fd41a7..c96480c2e3153ddc7d22357c5ab72404b65d166a 100755 (executable)
@@ -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
 }
index 3c25ea664f7044ac82e8f0d7405c15d39112654a..d3890aa0e9d8cceacfa117a1f32e4ee4aca2545a 100755 (executable)
@@ -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
 }
 
index a849819c6c4aa956c3510ec42d37e4bfe9422389..b0293a71bbfb986c590784ca111802ae71a1d2d4 100755 (executable)
@@ -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
 }