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:
jow 2013-12-10 12:19:18 +00:00
parent 722ee7bfa2
commit 8c6d805944
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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
}