wifitoggle: use ubus call network reload to apply wifi changes (#14587)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@39026 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
722ee7bfa2
commit
8c6d805944
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wifitoggle
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
@ -37,7 +37,12 @@ setwifi() {
|
||||
|
||||
config_load wireless
|
||||
config_foreach save_wireless wifi-device
|
||||
wifi
|
||||
|
||||
if ubus list network.wireless >/dev/null 2>/dev/null; then
|
||||
ubus call network reload
|
||||
else
|
||||
wifi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user