From 8a98df3d7536577d52e5c7d5ef93f31ca48c616f Mon Sep 17 00:00:00 2001 From: zribiahmed Date: Mon, 13 May 2013 17:20:43 +0000 Subject: [PATCH] --- src/scripts/functions/lan_device | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/scripts/functions/lan_device b/src/scripts/functions/lan_device index a21adbd..e2d3611 100644 --- a/src/scripts/functions/lan_device +++ b/src/scripts/functions/lan_device @@ -484,10 +484,11 @@ local val="$2" 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].key1="$val" - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set wireless.@wifi-iface[$num].key2="$val" - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set wireless.@wifi-iface[$num].key3="$val" - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set wireless.@wifi-iface[$num].key4="$val" + i=1 + for key in `/usr/sbin/wepkeygen 64 $val`;done + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set wireless.@wifi-iface[$num].key$i="$key" + let i++ + done let num=$num+1 local parm="InternetGatewayDevice.LANDevice.1.WLANConfiguration.$num.KeyPassphrase" freecwmp_notify "$parm" "$2" "xsd:unsignedInt"