<empty commit message>

This commit is contained in:
zribiahmed 2013-05-24 09:32:08 +00:00
parent 6fa71ee2e8
commit bebf7d2eb0

View file

@ -470,7 +470,7 @@ local encryption=""
case "$action" in
get_value)
encryption=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get wireless.@wifi-iface[$num].encryption`
if [ "$encryption" = "wep-shared" -o "$encryption" = "wep-open" ]; then
if [ "$encryption" = "wep-shared" ]; then
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get wireless.@wifi-iface[$num].key`
else
val=""
@ -546,6 +546,7 @@ case $action in
set_value)
delay_command "wifi" "wifi" "45"
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set wireless.@wifi-iface[$num].encryption=wep-shared
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set wireless.@wifi-iface[$num].key="1"
i=1
for key in `/usr/sbin/wepkeygen 64 $val`;do
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set wireless.@wifi-iface[$num].key$i="$key"