aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-12-31 13:09:20 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-12-31 13:09:20 +0000
commit20151a3394d446cc129f59aa2893c8af61e6c929 (patch)
treef4262a60b70c641738e8caac19df3827a83fac7a /package/network/config
parent1df5226b040c74f23ee7d001dc668c4a75c7e16b (diff)
downloadupstream-20151a3394d446cc129f59aa2893c8af61e6c929.tar.gz
upstream-20151a3394d446cc129f59aa2893c8af61e6c929.tar.bz2
upstream-20151a3394d446cc129f59aa2893c8af61e6c929.zip
netifd: initialize the switch early at start time and on reload (fixes #13015)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39183
Diffstat (limited to 'package/network/config')
-rwxr-xr-xpackage/network/config/netifd/files/etc/init.d/network16
1 files changed, 10 insertions, 6 deletions
diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network
index bc03783eb5..e117463ad1 100755
--- a/package/network/config/netifd/files/etc/init.d/network
+++ b/package/network/config/netifd/files/etc/init.d/network
@@ -5,7 +5,16 @@ STOP=90
USE_PROCD=1
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
start_service() {
+ init_switch
+
procd_open_instance
procd_set_param command /sbin/netifd
procd_set_param respawn
@@ -17,6 +26,7 @@ start_service() {
}
reload_service() {
+ init_switch
ubus call network reload
/sbin/wifi reload_legacy
}
@@ -26,13 +36,7 @@ stop_service() {
}
service_running() {
- setup_switch() { return 0; }
-
- include /lib/network
- setup_switch
-
sleep 5
-
/sbin/wifi reload_legacy
}