mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-10 03:07:46 +01:00
<empty commit message>
This commit is contained in:
parent
1ea2414796
commit
12ab98ec3a
6 changed files with 35 additions and 13 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue