From 3c50feca19208cccc7fd4a4c20deaa931267662d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 2 Dec 2013 16:53:24 +0000 Subject: wifi: rename the "reload" (restarting non-netifd wifi) command to "reload_legacy" Add a new "reload" command that reloads the netifd config as well Signed-off-by: Felix Fietkau SVN-Revision: 38989 --- package/base-files/files/sbin/wifi | 8 +++++++- package/network/config/netifd/files/etc/init.d/network | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi index 7663432..2687f1e 100755 --- a/package/base-files/files/sbin/wifi +++ b/package/base-files/files/sbin/wifi @@ -133,12 +133,17 @@ wifi_updown() { _wifi_updown "$@" } -wifi_reload() { +wifi_reload_legacy() { _wifi_updown "disable" "$1" scan_wifi _wifi_updown "enable" "$1" } +wifi_reload() { + ubus call network reload + wifi_reload_legacy +} + wifi_detect() { for driver in ${2:-$DRIVERS}; do ( if eval "type detect_$driver" 2>/dev/null >/dev/null; then @@ -224,6 +229,7 @@ case "$1" in detect) wifi_detect "$2";; status) ubus_wifi_cmd "status" "$2";; reload) wifi_reload "$2";; + reload_legacy) wifi_reload_legacy "$2";; --help|help) usage;; *) wifi_updown "enable" "$2";; esac diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network index 8b2d368..387fdbe 100755 --- a/package/network/config/netifd/files/etc/init.d/network +++ b/package/network/config/netifd/files/etc/init.d/network @@ -18,7 +18,7 @@ start_service() { reload_service() { ubus call network reload - /sbin/wifi reload + /sbin/wifi reload_legacy } stop_service() { -- cgit v1.1