[PATCH] fff-hoods: Remove gateway-up condition for hidden AP

Adrian Schmutzler freifunk at adrianschmutzler.de
Fr Okt 27 20:16:33 CEST 2017


Since the hidden AP clause is entered only once, there may be a case where
the router has been set up and hiddenapfile created, but the gateway being
temporarily unavailable. In this case, no configap would be set up.

This can be easily fixed by removing the gateway-available condition.
In fact, removing this has no negative side effects, as if the gateway
would be permanently off, the router would go into wXsta mode and
configap would be destroyed again anyway.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../fff/fff-hoods/files/usr/sbin/configurehood     | 35 ++++++++++------------
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
index 1eadc41..19a498a 100755
--- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
+++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
@@ -38,26 +38,23 @@ hasInternet() {
 # Hidden AP check
 
 if [ -f "$hiddenapfile" ]; then
-	if isGatewayAvailable ; then
-
-		for radio in $(uci show wireless | sed -n 's,.*\.\([a-z0-9]*\)=wifi-device,\1,p'); do
-			channel=$(uci get "wireless.${radio}.channel")
-			iface="configap2"
-			if [ "$channel" -gt "14" ]; then
-				iface="configap5"
-			fi
-			uci set network.${iface}=interface
-			uci set network.${iface}.proto='static'
-			uci set network.${iface}.ip6addr='fe80::1/64'
-			if ! wifiAddAP "$radio" "config.franken.freifunk.net" "$iface" "configap" "1"; then
-				echo "Can't add Config interface on $radio."
-				exit 1
-			fi
-		done
-		uci commit network
+	for radio in $(uci show wireless | sed -n 's,.*\.\([a-z0-9]*\)=wifi-device,\1,p'); do
+		channel=$(uci get "wireless.${radio}.channel")
+		iface="configap2"
+		if [ "$channel" -gt "14" ]; then
+			iface="configap5"
+		fi
+		uci set network.${iface}=interface
+		uci set network.${iface}.proto='static'
+		uci set network.${iface}.ip6addr='fe80::1/64'
+		if ! wifiAddAP "$radio" "config.franken.freifunk.net" "$iface" "configap" "1"; then
+			echo "Can't add Config interface on $radio."
+			exit 1
+		fi
+	done
+	uci commit network
 
-		wifi
-	fi
+	wifi
 	rm "$hiddenapfile"
 fi
 
-- 
2.7.4



Mehr Informationen über die Mailingliste franken-dev