wifitoggle: use ubus call network reload to apply wifi changes (#14587)
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 10 Dec 2013 12:19:18 +0000 (12:19 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 10 Dec 2013 12:19:18 +0000 (12:19 +0000)
SVN-Revision: 39026

utils/wifitoggle/Makefile
utils/wifitoggle/files/wifitoggle.hotplug

index b3154b69d2c1f56c567fe26f8762690fcaa407b0..1a4660c575f789c3eff8664d8786a0ad2fbde7a7 100644 (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
 
index 174693eceda551e51f61a29ba2bbbc8e1e09f1e3..d66db3f0a7ae8e95e11ace3030f10cfe47a5df8c 100755 (executable)
@@ -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
 }