contrib/meshwizard: Enable luci_splash and set local_restrict for wan firewall zone
authorManuel Munz <freifunk@somakoma.de>
Wed, 29 Jun 2011 11:28:28 +0000 (11:28 +0000)
committerManuel Munz <freifunk@somakoma.de>
Wed, 29 Jun 2011 11:28:28 +0000 (11:28 +0000)
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall.sh
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_splash.sh

index 299b167fe5d901c9a6be743e46569847d7b3c2a4..c9681425fffe4ae3f888412dbcfe7f78fa016c65 100755 (executable)
@@ -12,6 +12,15 @@ config_load firewall
 type="$(uci -q get wireless.$net.type)"
 vap="$(uci -q get meshwizard.netconfig.$net\_vap)"
 
+# Add local_restrict to wan firewall zone
+handle_zonewan() {
+       config_get name "$1" name
+       if [ "$name" == "wan" ]; then
+               uci set firewall.$1.local_restrict=1
+       fi
+}
+config_foreach handle_zonewan zone && echo "    + Enable local_restrict for zone wan"
+
 # Delete old firewall zone for freifunk
 handle_fwzone() {
        config_get name "$1" name
index f4375a4913ca6bd628378021ce5a399f4a89cfc8..b28ccc93c70e93b0adcac9af93b52a7a66fdfd03 100755 (executable)
@@ -30,3 +30,6 @@ EOF
 echo "    network: ${netrenamed}dhcp"
 
 uci commit
+
+/etc/init.d/luci_splash enable
+