diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-12-31 13:09:20 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-12-31 13:09:20 +0000 |
commit | b77e0ece626f7bc5def8c627fd822c8875ac6fa0 (patch) | |
tree | bc0bd94ba41e16394fd53c4d11863fa354b9afa3 /package/network | |
parent | c406bef2d0178fc87afd7de58b4ecf47b447a7df (diff) | |
download | master-187ad058-b77e0ece626f7bc5def8c627fd822c8875ac6fa0.tar.gz master-187ad058-b77e0ece626f7bc5def8c627fd822c8875ac6fa0.tar.bz2 master-187ad058-b77e0ece626f7bc5def8c627fd822c8875ac6fa0.zip |
netifd: initialize the switch early at start time and on reload (fixes #13015)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39183 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network')
-rwxr-xr-x | package/network/config/netifd/files/etc/init.d/network | 16 |
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 } |