fff-hoods: Replace wifi command with reload_config

If wireless config has changed, reload_config will automatically
adjust wireless interfaces.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
Adrian Schmutzler 2019-07-22 22:42:52 +02:00 committed by Fabian Bläse
parent a8f7dce6fc
commit 6c947f8c91
2 changed files with 5 additions and 6 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=fff-hoods PKG_NAME:=fff-hoods
PKG_RELEASE:=8 PKG_RELEASE:=9
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

View File

@ -60,8 +60,8 @@ if [ -s "$hoodfilewww" ] && isGatewayAvailable ; then
needwifi="1" needwifi="1"
done done
if [ "$needwifi" = "1" ] ; then if [ "$needwifi" = "1" ]; then
wifi reload_config
sleep 10 sleep 10
fi fi
fi fi
@ -145,7 +145,6 @@ if [ -s "$hoodfiletmp" ]; then
uci set "system.@system[0].hood=$hood" uci set "system.@system[0].hood=$hood"
uci set "system.@system[0].hoodid=$hoodid" uci set "system.@system[0].hoodid=$hoodid"
uci commit system uci commit system
reload_config
for radio in $(wifiListRadio); do for radio in $(wifiListRadio); do
freq="$(wifiGetFreq $radio)" freq="$(wifiGetFreq $radio)"
@ -190,8 +189,8 @@ if [ -s "$hoodfiletmp" ]; then
done done
uci commit wireless uci commit wireless
echo "Loading wifi" echo "Reloading wifi"
wifi reload_config
oldntp="$(uci -q get system.ntp.server)" oldntp="$(uci -q get system.ntp.server)"
newntp="${ntpip}" # requires routable address, no link-local newntp="${ntpip}" # requires routable address, no link-local