aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2019-10-30 16:59:14 +0100
committerDaniel Golle <daniel@makrotopia.org>2019-11-12 11:52:38 +0100
commit6becc37f33be4c2f2b5d58467bdda41c251d9e2e (patch)
treef42712d55cdfde2b4a03dcebae560bdbac16f3f3 /package/base-files/files/sbin
parenta5bc9787d4ef89c9e2593a191b3c4cf8702b41a3 (diff)
downloadupstream-6becc37f33be4c2f2b5d58467bdda41c251d9e2e.tar.gz
upstream-6becc37f33be4c2f2b5d58467bdda41c251d9e2e.tar.bz2
upstream-6becc37f33be4c2f2b5d58467bdda41c251d9e2e.zip
base-files: add 'wifi reconf'
Now that netifd and hostapd allow dynamic reconfiguration, add a command to trigger it. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/base-files/files/sbin')
-rwxr-xr-xpackage/base-files/files/sbin/wifi5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index f7a10de215..261d2fb500 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -130,6 +130,10 @@ wifi_updown() {
scan_wifi
cmd=up
}
+ [ reconf = "$1" ] && {
+ scan_wifi
+ cmd=reconf
+ }
ubus_wifi_cmd "$cmd" "$2"
_wifi_updown "$@"
}
@@ -241,6 +245,7 @@ case "$1" in
reload) wifi_reload "$2";;
reload_legacy) wifi_reload_legacy "$2";;
--help|help) usage;;
+ reconf) ubus call network reload; wifi_updown "reconf" "$2";;
''|up) ubus call network reload; wifi_updown "enable" "$2";;
*) usage; exit 1;;
esac