From bebf7d2eb06c8b65730289a1624d29e31f33d2c5 Mon Sep 17 00:00:00 2001 From: zribiahmed Date: Fri, 24 May 2013 09:32:08 +0000 Subject: [PATCH] --- src/scripts/functions/lan_device | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripts/functions/lan_device b/src/scripts/functions/lan_device index 1fe1c88..96ae71a 100644 --- a/src/scripts/functions/lan_device +++ b/src/scripts/functions/lan_device @@ -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"