From 6c947f8c91a17908be6fdc03703ae1ea1aefa168 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 22 Jul 2019 22:42:52 +0200 Subject: [PATCH] fff-hoods: Replace wifi command with reload_config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If wireless config has changed, reload_config will automatically adjust wireless interfaces. Signed-off-by: Adrian Schmutzler Reviewed-by: Fabian Bläse --- src/packages/fff/fff-hoods/Makefile | 2 +- src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/packages/fff/fff-hoods/Makefile b/src/packages/fff/fff-hoods/Makefile index 423403c..e5680c2 100644 --- a/src/packages/fff/fff-hoods/Makefile +++ b/src/packages/fff/fff-hoods/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fff-hoods -PKG_RELEASE:=8 +PKG_RELEASE:=9 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index dcdba89..8c7bb3d 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -60,8 +60,8 @@ if [ -s "$hoodfilewww" ] && isGatewayAvailable ; then needwifi="1" done - if [ "$needwifi" = "1" ] ; then - wifi + if [ "$needwifi" = "1" ]; then + reload_config sleep 10 fi fi @@ -145,7 +145,6 @@ if [ -s "$hoodfiletmp" ]; then uci set "system.@system[0].hood=$hood" uci set "system.@system[0].hoodid=$hoodid" uci commit system - reload_config for radio in $(wifiListRadio); do freq="$(wifiGetFreq $radio)" @@ -190,8 +189,8 @@ if [ -s "$hoodfiletmp" ]; then done uci commit wireless - echo "Loading wifi" - wifi + echo "Reloading wifi" + reload_config oldntp="$(uci -q get system.ntp.server)" newntp="${ntpip}" # requires routable address, no link-local