netifd: initialize the switch early at start time and on reload (fixes #13015)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39183
This commit is contained in:
parent
1df5226b04
commit
20151a3394
@ -5,7 +5,16 @@ STOP=90
|
|||||||
|
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
|
init_switch() {
|
||||||
|
setup_switch() { return 0; }
|
||||||
|
|
||||||
|
include /lib/network
|
||||||
|
setup_switch
|
||||||
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
|
init_switch
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
procd_set_param command /sbin/netifd
|
procd_set_param command /sbin/netifd
|
||||||
procd_set_param respawn
|
procd_set_param respawn
|
||||||
@ -17,6 +26,7 @@ start_service() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
reload_service() {
|
reload_service() {
|
||||||
|
init_switch
|
||||||
ubus call network reload
|
ubus call network reload
|
||||||
/sbin/wifi reload_legacy
|
/sbin/wifi reload_legacy
|
||||||
}
|
}
|
||||||
@ -26,13 +36,7 @@ stop_service() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
service_running() {
|
service_running() {
|
||||||
setup_switch() { return 0; }
|
|
||||||
|
|
||||||
include /lib/network
|
|
||||||
setup_switch
|
|
||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
/sbin/wifi reload_legacy
|
/sbin/wifi reload_legacy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user