<empty commit message>

This commit is contained in:
zribiahmed 2012-11-25 13:42:44 +00:00
parent 1ea2414796
commit 12ab98ec3a
6 changed files with 35 additions and 13 deletions

View file

@ -42,7 +42,7 @@ case "$1" in
if [ "$2" = "notification" ]; then
__arg1="$3"
__arg2="$4"
__arg3="echo $5| tr '[A-Z]' '[a-z]'"
__arg3="`echo $5| tr '[A-Z]' '[a-z]'`"
action="set_notification"
elif [ "$2" = "tag" ]; then
__arg1="$3"
@ -299,15 +299,15 @@ if [ "$action" = "get_notification" -o "$action" = "get_all" ]; then
fi
if [ "$action" = "set_notification" ]; then
no_fault="0"
freecwmp_check_fault "$__arg1"
fault_code="$?"
if [ "$__arg3" = "true" ]; then
__arg3="1"
elif [ "$__arg3" = "false" ]; then
__arg3="0"
fi
if [ "$__arg3" = "1" ]; then
no_fault="0"
freecwmp_check_fault "$__arg1"
fault_code="$?"
if [ "$fault_code" = "0" ]; then
if [ \( "$__arg1" = "InternetGatewayDevice." \) -o \( "$__arg1" = "" \) ]; then
__arg1="InternetGatewayDevice."
@ -394,7 +394,7 @@ if [ \( "$action" = "apply_notification" \) -o \( "$action" = "apply_value" \) ]
if [ "$action" = "apply_notification" ]; then break; fi
done
rm -rf /var/state/cwmp 2> /dev/null
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} revert freecwmp
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} revert cwmp
fi
fi

View file

@ -176,6 +176,9 @@ freecwmp_config_notifications() {
if [ "$item" = "$3" ]; then
eval "export -- \"$4=2\""
return 0
elif [ "`echo $3|grep $item`" = "$3" ]; then
eval "export -- \"$4=2\""
return 0
fi
done
for item in $__passive
@ -183,6 +186,9 @@ freecwmp_config_notifications() {
if [ "$item" = "$3" ]; then
eval "export -- \"$4=1\""
return 0
elif [ "`echo $3|grep $item`" = "$3" ]; then
eval "export -- \"$4=1\""
return 0
fi
done
}

View file

@ -452,6 +452,10 @@ return $FAULT_CPE_INVALID_PARAMETER_NAME
set_device_info_notification() {
case "$1" in
InternetGatewayDevice.DeviceInfo.)
freecwmp_set_parameter_notification "$1" "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.DeviceInfo.Manufacturer)
set_device_info_manufacturer "$2"
return $FAULT_CPE_NO_FAULT

View file

@ -427,6 +427,13 @@ return $FAULT_CPE_INVALID_PARAMETER_NAME
set_lan_device_notification() {
case "$1" in
InternetGatewayDevice.LANDevice.|\
InternetGatewayDevice.LANDevice.1.|\
InternetGatewayDevice.LANDevice.1.WLANConfiguration.|\
InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.)
freecwmp_set_parameter_notification "$1" "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Enable)
set_wlan_enable 0 "$2"
return $FAULT_CPE_NO_FAULT

View file

@ -712,6 +712,10 @@ return $FAULT_CPE_INVALID_PARAMETER_NAME
set_management_server_notification() {
case "$1" in
InternetGatewayDevice.ManagementServer.)
freecwmp_set_parameter_notification "$1" "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.URL)
set_management_server_url "$2"
return $FAULT_CPE_NO_FAULT

View file

@ -475,14 +475,6 @@ return $FAULT_CPE_INVALID_PARAMETER_NAME
set_wan_device() {
case "$1" in
InternetGatewayDevice.WANDevice.|\
InternetGatewayDevice.WANDevice.1.|\
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.|\
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.|\
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.|\
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.)
freecwmp_set_parameter_notification "$1" "$2"
;;
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Enable)
set_wan_device_wan_ppp_enable "$2"
return $FAULT_CPE_NO_FAULT
@ -502,6 +494,15 @@ return $FAULT_CPE_INVALID_PARAMETER_NAME
set_wan_device_notification() {
case "$1" in
InternetGatewayDevice.WANDevice.|\
InternetGatewayDevice.WANDevice.1.|\
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.|\
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.|\
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.|\
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.)
freecwmp_set_parameter_notification "$1" "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Enable)
set_wan_device_wan_ppp_enable "$2"
return $FAULT_CPE_NO_FAULT