luci.mk: move /tmp/luci-indexcache remove to package postinst script
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 13 Feb 2020 14:11:16 +0000 (15:11 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Fri, 14 Feb 2020 08:20:33 +0000 (09:20 +0100)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
41 files changed:
applications/luci-app-adblock/root/etc/uci-defaults/40_luci-adblock [deleted file]
applications/luci-app-advanced-reboot/root/etc/uci-defaults/40_luci-advanced-reboot
applications/luci-app-ahcp/root/etc/uci-defaults/40_luci-ahcp
applications/luci-app-aria2/root/etc/uci-defaults/40_luci-aria2
applications/luci-app-attendedsysupgrade/root/etc/uci-defaults/40_luci-attendedsysupgrade
applications/luci-app-banip/root/etc/uci-defaults/40_luci-banip [deleted file]
applications/luci-app-bcp38/root/etc/uci-defaults/60_luci-bcp38 [deleted file]
applications/luci-app-dcwapd/root/etc/uci-defaults/60_luci-dcwapd [deleted file]
applications/luci-app-ddns/root/etc/uci-defaults/40_luci-ddns
applications/luci-app-dnscrypt-proxy/root/etc/uci-defaults/60_luci-dnscrypt-proxy [deleted file]
applications/luci-app-dump1090/root/etc/uci-defaults/40_luci-dump1090 [deleted file]
applications/luci-app-dynapoint/root/etc/uci-defaults/40_luci-dynapoint
applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd
applications/luci-app-hd-idle/root/etc/uci-defaults/40_luci-hd_idle [deleted file]
applications/luci-app-https-dns-proxy/root/etc/uci-defaults/40_luci-https-dns-proxy
applications/luci-app-minidlna/root/etc/uci-defaults/40_luci-minidlna
applications/luci-app-mjpg-streamer/root/etc/uci-defaults/40_luci-mjpg-streamer [deleted file]
applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3
applications/luci-app-nextdns/root/etc/uci-defaults/60_luci-nextdns [deleted file]
applications/luci-app-nlbwmon/root/etc/uci-defaults/40_luci-nlbwmon [deleted file]
applications/luci-app-noddos/root/etc/uci-defaults/40_luci-noddos [deleted file]
applications/luci-app-nut/root/etc/uci-defaults/40_luci-nut
applications/luci-app-olsr/root/etc/uci-defaults/40_luci-olsr
applications/luci-app-p910nd/root/etc/uci-defaults/40_luci-p910nd
applications/luci-app-pagekitec/root/etc/uci-defaults/40_luci-pagekitec [deleted file]
applications/luci-app-polipo/root/etc/uci-defaults/40_luci-polipo
applications/luci-app-privoxy/root/etc/uci-defaults/40_luci-privoxy
applications/luci-app-radicale/root/etc/uci-defaults/40_luci-radicale
applications/luci-app-shadowsocks-libev/root/etc/uci-defaults/40_luci-shadowsocks-libev
applications/luci-app-shairplay/root/etc/uci-defaults/40_luci-shairplay [deleted file]
applications/luci-app-simple-adblock/root/etc/uci-defaults/40_luci-simple-adblock
applications/luci-app-statistics/root/etc/uci-defaults/40_luci-statistics
applications/luci-app-travelmate/root/etc/uci-defaults/40_luci-travelmate [deleted file]
applications/luci-app-udpxy/root/etc/uci-defaults/40_luci-udpxy [deleted file]
applications/luci-app-unbound/root/etc/uci-defaults/60_luci-unbound [deleted file]
applications/luci-app-upnp/root/etc/uci-defaults/40_luci-miniupnp
applications/luci-app-vnstat/root/etc/uci-defaults/40_luci-vnstat [deleted file]
applications/luci-app-vpn-policy-routing/root/etc/uci-defaults/40_luci-vpn-policy-routing
applications/luci-app-vpnbypass/root/etc/uci-defaults/40_luci-vpnbypass [deleted file]
applications/luci-app-watchcat/root/etc/uci-defaults/40_luci-watchcat
luci.mk

diff --git a/applications/luci-app-adblock/root/etc/uci-defaults/40_luci-adblock b/applications/luci-app-adblock/root/etc/uci-defaults/40_luci-adblock
deleted file mode 100755 (executable)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
index e1a8f1e3075833729cf1a2c9b3ee390dcdd403e2..afe697389f5183cea70df71af15a28e97da75ffb 100644 (file)
@@ -1,5 +1,4 @@
 #!/bin/sh
 
-rm -rf /var/luci-modulecache/; rm -f /var/luci-indexcache;
+rm -rf /var/luci-modulecache/;
 exit 0
-
index f2b2487cac19fb7970e08cf08847aed701a5a109..c0270a33c6260de1e268d4627185adc2894dfa74 100755 (executable)
@@ -7,5 +7,4 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-rm -f /tmp/luci-indexcache
 exit 0
index a6b485a5c88419970524964cbf3e5fe2218680fb..97ea9ca27cf1f09d06ec04300472b21b07bf66a1 100755 (executable)
@@ -14,5 +14,4 @@ if [ ."$(uci -q get aria2.main)" != ."aria2" ]; then
        EOF
 fi
 
-rm -f /tmp/luci-indexcache
 exit 0
index 1b890c0cbb87b12d6b786e33607c2c1682298397..ceebc6630ffb0fa0dc42ad353b4ffda6d34da58f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-rm -rf /tmp/luci-indexcache /tmp/luci-modulecache/
+rm -rf /tmp/luci-modulecache/
 /etc/init.d/uhttpd restart
 /etc/init.d/rpcd reload
 
diff --git a/applications/luci-app-banip/root/etc/uci-defaults/40_luci-banip b/applications/luci-app-banip/root/etc/uci-defaults/40_luci-banip
deleted file mode 100755 (executable)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
diff --git a/applications/luci-app-bcp38/root/etc/uci-defaults/60_luci-bcp38 b/applications/luci-app-bcp38/root/etc/uci-defaults/60_luci-bcp38
deleted file mode 100755 (executable)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
diff --git a/applications/luci-app-dcwapd/root/etc/uci-defaults/60_luci-dcwapd b/applications/luci-app-dcwapd/root/etc/uci-defaults/60_luci-dcwapd
deleted file mode 100644 (file)
index c52d3c2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-exit 0
index a82c1f9ac6f1d8dae520a76b092cb054ee99d12a..9923e8677e97b2e59e8910880a0d730a9eb60372 100755 (executable)
@@ -6,5 +6,4 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-rm -f /tmp/luci-indexcache
 return 0
diff --git a/applications/luci-app-dnscrypt-proxy/root/etc/uci-defaults/60_luci-dnscrypt-proxy b/applications/luci-app-dnscrypt-proxy/root/etc/uci-defaults/60_luci-dnscrypt-proxy
deleted file mode 100755 (executable)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
diff --git a/applications/luci-app-dump1090/root/etc/uci-defaults/40_luci-dump1090 b/applications/luci-app-dump1090/root/etc/uci-defaults/40_luci-dump1090
deleted file mode 100644 (file)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
index 7287ccd4200d4c3a38a274866566afcd528f3378..0ffa34d7627a3ae90d392a21a65afed26719c88a 100644 (file)
@@ -8,6 +8,4 @@ uci -q batch <<-EOF >/dev/null
        commit dynapoint
 EOF
 
-rm -f /tmp/luci-indexcache
 exit 0
-
index f81c941e83aee00da2d8183e5bfe4f0d180c9f4b..7cecf27461e5b16e4a22166474bab0996f026532 100644 (file)
@@ -15,5 +15,4 @@ uci set fwknopd.@config[0].ENABLE_IPT_FORWARDING='y'
 uci set fwknopd.@config[0].ENABLE_NAT_DNS='y'
 
 uci commit fwknopd
-rm -f /tmp/luci-indexcache
 exit 0
diff --git a/applications/luci-app-hd-idle/root/etc/uci-defaults/40_luci-hd_idle b/applications/luci-app-hd-idle/root/etc/uci-defaults/40_luci-hd_idle
deleted file mode 100755 (executable)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
index a1ecfcea2434b3295cb686eb4e9dffadb2e1dea8..2a2f1e7c4b635afbb79acc36e75b97a39dc07c1d 100644 (file)
@@ -1,3 +1,3 @@
 #!/bin/sh
-rm -rf /var/luci-modulecache/; rm -f /var/luci-indexcache;
+rm -rf /var/luci-modulecache/
 exit 0
index 47570307bae955c70364748f72248faccf37e5b4..8a73b955a5cbe3c9e9b35cc6c11004e850a12c70 100755 (executable)
@@ -6,5 +6,4 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-rm -f /tmp/luci-indexcache
 exit 0
diff --git a/applications/luci-app-mjpg-streamer/root/etc/uci-defaults/40_luci-mjpg-streamer b/applications/luci-app-mjpg-streamer/root/etc/uci-defaults/40_luci-mjpg-streamer
deleted file mode 100755 (executable)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
index 150ea5a3f106b661f554280a9e90609e236ca2d9..528415f5a7c1978ab22e85af2610383a5fc505a0 100755 (executable)
@@ -15,7 +15,4 @@ uci -q get mwan3.globals >/dev/null || {
        uci commit mwan3
 }
 
-# remove LuCI cache
-rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
-
 exit 0
diff --git a/applications/luci-app-nextdns/root/etc/uci-defaults/60_luci-nextdns b/applications/luci-app-nextdns/root/etc/uci-defaults/60_luci-nextdns
deleted file mode 100755 (executable)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
diff --git a/applications/luci-app-nlbwmon/root/etc/uci-defaults/40_luci-nlbwmon b/applications/luci-app-nlbwmon/root/etc/uci-defaults/40_luci-nlbwmon
deleted file mode 100644 (file)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
diff --git a/applications/luci-app-noddos/root/etc/uci-defaults/40_luci-noddos b/applications/luci-app-noddos/root/etc/uci-defaults/40_luci-noddos
deleted file mode 100644 (file)
index 5225b63..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2017 Steven Hessing (steven.hessing@live.com)
-# This is free software, licensed under the GNU General Public License v3
-
-rm -f /tmp/luci-indexcache
-exit 0
index 621f6a6a38368bd27ed0125cb2fe37bfdeb7dee2..45a1fbb431e74ca54ae0fe7310ed3fc1ec4875fa 100755 (executable)
@@ -18,5 +18,4 @@ if [ "$version" = "2.7.4" ] && [ "$release" -lt 8 ]; then
 EOF
 fi
 
-rm -f /tmp/luci-indexcache
 exit 0
index 63c01e4a2c3b85d4dcbac490248a3a9ea92502ca..a941abd54cb79f08f04bb72703f3e9f81afc552f 100755 (executable)
@@ -10,5 +10,4 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-rm -f /tmp/luci-indexcache
 exit 0
index 80f6d62fa2c400f083c5d7b9748577557663ebe9..d1b629fdeecbfb4275bd7aeeeaef66196f7d5351 100755 (executable)
@@ -7,5 +7,4 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-rm -f /tmp/luci-indexcache
 exit 0
diff --git a/applications/luci-app-pagekitec/root/etc/uci-defaults/40_luci-pagekitec b/applications/luci-app-pagekitec/root/etc/uci-defaults/40_luci-pagekitec
deleted file mode 100755 (executable)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
index 0c570630da5955579909d23a8bcf1843ca931492..60af421389215752641420da6e7f059a849e0f65 100755 (executable)
@@ -7,5 +7,4 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-rm -f /tmp/luci-indexcache
 exit 0
index 3405479b543cb3049d0700e8899991737b9cc3b2..884f7e5572b6b4b49b332e08f5404b6c07904333 100755 (executable)
@@ -7,6 +7,4 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-rm -f /tmp/luci-indexcache
-
 exit 0
index 333ca65f45abe0a6e7e755cc14f1bfc9ef4e5a62..a5064b520fa9399b16021c3da9eeecff15f202e9 100755 (executable)
@@ -7,6 +7,4 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-rm -f /tmp/luci-indexcache
-
 exit 0
index 10e1c702ff5d599508795226a442224be1c01408..f74c13db4cd18816f55e08fc910808e78774950d 100644 (file)
@@ -1,6 +1,5 @@
 #!/bin/sh
 
-rm -f /tmp/luci-indexcache
 mkdir -p /etc/shadowsocks-libev
 /etc/init.d/rpcd reload
 exit 0
diff --git a/applications/luci-app-shairplay/root/etc/uci-defaults/40_luci-shairplay b/applications/luci-app-shairplay/root/etc/uci-defaults/40_luci-shairplay
deleted file mode 100644 (file)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
index 97bc9fbee02da68348aa9178adf7adf914e421bf..64b349e68941f1117531734f25cc1a92c4e39176 100644 (file)
@@ -4,5 +4,4 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-rm -f /tmp/luci-indexcache
 exit 0
index 28e35298a26071ca4ad93fc5af5ef581b0a6e4f5..c05cb82af03c1a356fb5068d96876206d88c385e 100755 (executable)
@@ -12,5 +12,4 @@ EOF
 [ -x /usr/sbin/httpd ] && [ ! -h /www/rrdimg ] && \
        ln -s /tmp/rrdimg /www/rrdimg
 
-rm -f /tmp/luci-indexcache
 exit 0
diff --git a/applications/luci-app-travelmate/root/etc/uci-defaults/40_luci-travelmate b/applications/luci-app-travelmate/root/etc/uci-defaults/40_luci-travelmate
deleted file mode 100755 (executable)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
diff --git a/applications/luci-app-udpxy/root/etc/uci-defaults/40_luci-udpxy b/applications/luci-app-udpxy/root/etc/uci-defaults/40_luci-udpxy
deleted file mode 100644 (file)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
diff --git a/applications/luci-app-unbound/root/etc/uci-defaults/60_luci-unbound b/applications/luci-app-unbound/root/etc/uci-defaults/60_luci-unbound
deleted file mode 100644 (file)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
index e9636f9a2801490f25760704188235272be71506..f63d648c068dce5ad207c4c426b5ce8444568080 100755 (executable)
@@ -7,5 +7,4 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-rm -f /tmp/luci-indexcache
 exit 0
diff --git a/applications/luci-app-vnstat/root/etc/uci-defaults/40_luci-vnstat b/applications/luci-app-vnstat/root/etc/uci-defaults/40_luci-vnstat
deleted file mode 100755 (executable)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
index a1ecfcea2434b3295cb686eb4e9dffadb2e1dea8..afe3de8c6018adb0dbbf822ba486e57e9204b7fa 100644 (file)
@@ -1,3 +1,3 @@
 #!/bin/sh
-rm -rf /var/luci-modulecache/; rm -f /var/luci-indexcache;
+rm -rf /var/luci-modulecache/;
 exit 0
diff --git a/applications/luci-app-vpnbypass/root/etc/uci-defaults/40_luci-vpnbypass b/applications/luci-app-vpnbypass/root/etc/uci-defaults/40_luci-vpnbypass
deleted file mode 100644 (file)
index d7bfee2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/luci-indexcache
-exit 0
index 6eb87210e096052ea92ed6dcdb541d8061253b99..02a7f09783195d37ab30eb09a10d2d8643ed86e3 100644 (file)
@@ -7,5 +7,4 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-rm -f /tmp/luci-indexcache
 exit 0
diff --git a/luci.mk b/luci.mk
index 5333fe11a163a7bd6e6828a4ac90921e13feda74..fc02e84f7e1fa294ae752ff5d430e8e93d44efb7 100644 (file)
--- a/luci.mk
+++ b/luci.mk
@@ -229,6 +229,13 @@ define Package/$(PKG_NAME)/postinst
        exit 0
 }
 endef
+else
+define Package/$(PKG_NAME)/postinst
+[ -n "$${IPKG_INSTROOT}" ] || {
+       rm -f /tmp/luci-indexcache
+       exit 0
+}
+endef
 endif