1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
Ycarus (Yannick Chabanois) 2021-07-12 18:06:41 +02:00
parent c6d6552d76
commit f7136422ca

View file

@ -1,18 +1,22 @@
#!/bin/sh
if [ "$(uci -q get wireless.radio0)" != "" ]; then
if [ "$(uci -q get wireless.radio0.country)" = "" ]; then
if [ "$(uci -q get wifi-iface.radio0)" != "" ] && [ "$(uci -q get wifi-iface.default_radio0.key)" = "12345678" ]; then
if [ "$(uci -q get wifi-device.radio0.country)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set wireless.radio0.country='00'
set wireless.default_radio0.skip_inactivity_poll='1'
commit wireless
set wifi-device.radio0.country='00'
commit wifi-device
EOF
fi
if [ "$(uci -q get wireless.default_radio0.network)" = "lan" ]; then
if [ -n "$(uci -q get wifi-iface.radio0.network | grep lan)" ]; then
uci -q batch <<-EOF >/dev/null
set wireless.default_radio0.network='wifi'
commit wireless
set wifi-iface.default_radio0.network='wifi'
commit wifi-iface
EOF
fi
if [ -n "$(uci -q get wifi-device.radio0.cell_density)" ]; then
uci -q batch <<-EOF >/dev/null
delete wifi-device.radio0.cell_density
commit wifi-device
EOF
fi
fi