mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
inteno-netmodes: reboot unless reboot is not set to 0
This commit is contained in:
parent
c0b299231d
commit
7d9442cbb2
1 changed files with 5 additions and 5 deletions
|
|
@ -161,17 +161,13 @@ switch_netmode() {
|
|||
|
||||
local reboot=$(uci -q get netmode.$curmode.reboot)
|
||||
|
||||
if [ "$reboot" == "1" ]; then
|
||||
if [ "$reboot" != "0" ]; then
|
||||
reboot &
|
||||
exit
|
||||
fi
|
||||
|
||||
/etc/init.d/environment reload
|
||||
case "$curmode" in
|
||||
routed*)
|
||||
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
;;
|
||||
repeater*)
|
||||
touch $SWITCHMODELOCK
|
||||
echo "Switching to $curmode mode" > /dev/console
|
||||
|
|
@ -186,6 +182,10 @@ switch_netmode() {
|
|||
ubus call leds set '{"state" : "normal"}'
|
||||
rm -f $SWITCHMODELOCK
|
||||
;;
|
||||
*)
|
||||
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue