netifd: auto detect mtk wifi-profile scripts

This commit is contained in:
hanwckf 2023-10-16 01:47:17 +08:00
parent 032821b7af
commit 602b929c98

View File

@ -30,7 +30,11 @@ reload_service() {
init_switch init_switch
ubus call network reload || rv=1 ubus call network reload || rv=1
if [ -f "/lib/wifi/mtwifi.lua" ]; then
/sbin/wifi up /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()