[PATCH] fff-hoods: Replace wifi command with reload_config
Adrian Schmutzler
freifunk at adrianschmutzler.de
Mo Jul 22 22:42:52 CEST 2019
If wireless config has changed, reload_config will automatically
adjust wireless interfaces.
Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
Resend of single patch starting at v1 again.
---
src/packages/fff/fff-hoods/Makefile | 2 +-
.../fff/fff-hoods/files/usr/lib/functions/fff/hoodfile | 1 -
src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 9 ++++-----
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/packages/fff/fff-hoods/Makefile b/src/packages/fff/fff-hoods/Makefile
index 11d2523b..5eb20ca5 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:=6
+PKG_RELEASE:=7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
diff --git a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
index 9bc6a35d..8ea30d55 100644
--- a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
+++ b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
@@ -27,7 +27,6 @@ getWirelessHoodfile() {
uci commit wireless
reload_config
- wifi
# wait a moment to start the interface
sleep 10;
diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
index d5dc2c00..81bc37ff 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. at system[0].hood=$hood"
uci set "system. at system[0].hoodid=$hoodid"
uci commit system
- reload_config
for radio in $(wifiListRadio); do
freq="$(wifiGetFreq $radio)"
@@ -191,8 +190,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
--
2.20.1
Mehr Informationen über die Mailingliste franken-dev