Skip to content

Commit

Permalink
fix widora_mode support space or special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
mango committed Apr 19, 2017
1 parent b4bb7a6 commit f8c8780
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions package/mtk-wifi/files/sbin/widora_mode
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ wifi down
sleep 1
case $1 in
repeater) #repeater mode
[ -n "$2" ] && uci set wireless.sta.ssid=$2
[ -n "$3" ] && uci set wireless.sta.key=$3
[ -n "$2" ] && uci set wireless.sta.ssid="$2"
[ -n "$3" ] && uci set wireless.sta.key="$3"
uci set wireless.sta.network=lan
uci set wireless.sta.disabled=0
uci set wireless.ap.hidden=0
Expand All @@ -17,8 +17,8 @@ repeater) #repeater mode
/etc/init.d/network restart
;;
client) #client mode
[ -n "$2" ] && uci set wireless.sta.ssid=$2
[ -n "$3" ] && uci set wireless.sta.key=$3
[ -n "$2" ] && uci set wireless.sta.ssid="$2"
[ -n "$3" ] && uci set wireless.sta.key="$3"
uci set wireless.sta.disabled=0
uci set wireless.sta.network=wan
uci set wireless.ap.hidden=1
Expand Down Expand Up @@ -54,8 +54,8 @@ pppoe) #pppoe mode
uci set network.wan=interface
uci set network.wan.ifname='eth0'
uci set network.wan.proto='pppoe'
[ -n "$2" ] && uci set network.wan.username=$2
[ -n "$3" ] && uci set network.wan.password=$3
[ -n "$2" ] && uci set network.wan.username="$2"
[ -n "$3" ] && uci set network.wan.password="$3"
uci commit
/etc/init.d/network restart
;;
Expand Down

0 comments on commit f8c8780

Please sign in to comment.