mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 02:43:53 +08:00
netifd: auto detect mtk wifi-profile scripts
This commit is contained in:
parent
032821b7af
commit
602b929c98
@ -30,7 +30,11 @@ reload_service() {
|
|||||||
|
|
||||||
init_switch
|
init_switch
|
||||||
ubus call network reload || rv=1
|
ubus call network reload || rv=1
|
||||||
/sbin/wifi up
|
if [ -f "/lib/wifi/mtwifi.lua" ]; then
|
||||||
|
/sbin/wifi up
|
||||||
|
else
|
||||||
|
/sbin/wifi reload_legacy
|
||||||
|
fi
|
||||||
return $rv
|
return $rv
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,12 +44,11 @@ stop_service() {
|
|||||||
sleep 1
|
sleep 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
service_running() {
|
service_running() {
|
||||||
|
if [ -f "/lib/wifi/mtwifi.lua" ]; then
|
||||||
ubus -t 120 wait_for network.interface.lan
|
ubus -t 120 wait_for network.interface.lan
|
||||||
/sbin/wifi reload_legacy
|
/sbin/wifi reload_legacy
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
validate_atm_bridge_section()
|
validate_atm_bridge_section()
|
||||||
@ -147,8 +150,8 @@ service_triggers()
|
|||||||
}
|
}
|
||||||
|
|
||||||
shutdown() {
|
shutdown() {
|
||||||
/sbin/wifi down
|
/sbin/wifi down
|
||||||
ifdown -a
|
ifdown -a
|
||||||
sleep 1
|
sleep 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user