applications/luci-splash: Only restart splash in hotplug for interfaces which are...
authorManuel Munz <freifunk@somakoma.de>
Sun, 2 Jun 2013 23:48:30 +0000 (23:48 +0000)
committerManuel Munz <freifunk@somakoma.de>
Sun, 2 Jun 2013 23:48:30 +0000 (23:48 +0000)
applications/luci-splash/root/etc/hotplug.d/iface/25-splash

index cf826835083f7cf5fb0d25951031f9d4cb6bb95e..045e908c7206496ce9941db425e2304930c92f6f 100644 (file)
@@ -5,6 +5,13 @@
 /etc/init.d/firewall enabled || exit 0
 
 if [ -x /etc/init.d/luci_splash ]; then
-       logger -t splash "Reloading splash firewall rules due to ifup of $INTERFACE ($DEVICE)"
-       /etc/init.d/luci_splash restart
+       restart_splash() {
+               local net="$1"
+               if [ "$INTERFACE" = "$net" ]; then
+                       logger -t splash "Reloading splash firewall rules due to ifup of $INTERFACE ($DEVICE)"
+                       /etc/init.d/luci_splash restart
+               fi
+       }
+       config_load luci_splash
+       config_foreach restart_splash iface
 fi