diff --git a/src/scripts/functions/device_info b/src/scripts/functions/device_info index 2d134fc..a0bb962 100644 --- a/src/scripts/functions/device_info +++ b/src/scripts/functions/device_info @@ -7,7 +7,7 @@ local val="" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.cpe.manufacturer 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.cpe.manufacturer 2> /dev/null` ;; get_name) permissions="0" @@ -24,7 +24,7 @@ local val="" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.cpe.oui 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.cpe.oui 2> /dev/null` ;; get_name) permissions="0" @@ -40,7 +40,7 @@ get_device_info_product_class() { local val="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.cpe.product_class 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.cpe.product_class 2> /dev/null` ;; get_name) permissions="0" @@ -57,7 +57,7 @@ local val="" local permissions="" case "$action" in get_value) - local val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.cpe.serial_number 2> /dev/null` + local val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.cpe.serial_number 2> /dev/null` ;; get_name) permissions="0" @@ -74,7 +74,7 @@ local val="" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.cpe.hardware_version 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.cpe.hardware_version 2> /dev/null` ;; get_name) permissions="0" @@ -91,7 +91,7 @@ local val="" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.cpe.software_version 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.cpe.software_version 2> /dev/null` ;; get_name) permissions="0" diff --git a/src/scripts/functions/lan_device b/src/scripts/functions/lan_device index 1c829f6..9461ffb 100644 --- a/src/scripts/functions/lan_device +++ b/src/scripts/functions/lan_device @@ -9,7 +9,7 @@ local val="" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get wireless.@wifi-device[$num].disabled 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get wireless.@wifi-device[$num].disabled 2> /dev/null` let num=$num+1 if [ "$val" = "1" ]; then val="0" @@ -43,7 +43,7 @@ case $action in val="1" fi delay_command "wifi" "wifi" "45" - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set wireless.@wifi-device[$num].disabled="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set wireless.@wifi-device[$num].disabled="$val" ;; set_notification) let num=$num+1 @@ -58,7 +58,7 @@ local val="" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get wireless.@wifi-iface[$num].ssid 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get wireless.@wifi-iface[$num].ssid 2> /dev/null` let num=$num+1 freecwmp_output "InternetGatewayDevice.LANDevice.1.WLANConfiguration.$num.SSID" "$val" ;; @@ -83,7 +83,7 @@ local parm="InternetGatewayDevice.LANDevice.1.WLANConfiguration.$num.SSID" case $action in set_value) delay_command "wifi" "wifi" "45" - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set wireless.@wifi-iface[$num].ssid="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set wireless.@wifi-iface[$num].ssid="$val" ;; set_notification) let num=$num+1 @@ -95,13 +95,13 @@ esac add_ip_interface() { local i=0 local instance=0 - while [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].instance 2>/dev/null`" != "" ] ;do - instance=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].instance 2>/dev/null` + while [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].instance 2>/dev/null`" != "" ] ;do + instance=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].instance 2>/dev/null` let i=$i+1 done let instance=$instance+1 freecwmp_add_lan_device_ip_interface "$1$instance." "$instance" - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q commit freecwmp_output "" "" "" "" "" "0" "$instance" } @@ -111,7 +111,7 @@ while [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].p do if [ "$action" = "get_name" ];then let i=$i+1 - local parm=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null` + local parm=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null` permissions="1" freecwmp_output "$parm" "" "$permissions" fi @@ -122,13 +122,13 @@ get_ip_interface_ip_address() { local val="" local permissions="" local i=0 -while [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null`" != "" ] +while [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null`" != "" ] do - local parm=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null` - local indice=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].instance 2>/dev/null` + local parm=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null` + local indice=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].instance 2>/dev/null` case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get network.lan$indice.ipaddr 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get network.lan$indice.ipaddr 2> /dev/null` freecwmp_output $parm"IPInterfaceIPAddress" "$val" ;; get_name) @@ -146,17 +146,17 @@ set_ip_interface_ip_address() { local _parm="$1" local ipaddr="$2" _parm="${_parm%.*}." - while [ \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null`" != "$_parm" \) -a \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null`" != "" \) ] + while [ \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null`" != "$_parm" \) -a \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null`" != "" \) ] do let i=$i+1 done - if [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null`" = "" ]; then + if [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null`" = "" ]; then return $FAULT_CPE_INVALID_PARAMETER_NAME fi - local indice=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].instance` - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set network.lan$indice.ipaddr=$ipaddr - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set network.lan$indice.proto=static - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit + local indice=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].instance` + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set network.lan$indice.ipaddr=$ipaddr + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set network.lan$indice.proto=static + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q commit return $FAULT_CPE_NO_FAULT } @@ -164,13 +164,13 @@ get_ip_interface_netmask() { local val="" local permissions="" local i=0 -while [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null`" != "" ] +while [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null`" != "" ] do - local parm=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null` - local indice=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].instance 2>/dev/null` + local parm=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null` + local indice=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].instance 2>/dev/null` case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get network.lan$indice.netmask 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get network.lan$indice.netmask 2> /dev/null` freecwmp_output $parm"IPInterfaceSubnetMask" "$val" ;; get_name) @@ -188,24 +188,24 @@ set_ip_interface_netmask() { local _parm="$1" local netmask="$2" _parm="${_parm%.*}." - while [ \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null`" != "$_parm" \) -a \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null`" != "" \) ] + while [ \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null`" != "$_parm" \) -a \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null`" != "" \) ] do let i=$i+1 done - if [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null`" = "" ]; then + if [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null`" = "" ]; then return $FAULT_CPE_INVALID_PARAMETER_NAME fi - local indice=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].instance` - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set network.lan$indice.netmask=$netmask - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit + local indice=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].instance` + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set network.lan$indice.netmask=$netmask + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q commit return $FAULT_CPE_NO_FAULT } delete_ip_interface() { - local indice=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$1].instance` - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} delete cwmp.@object[$1] - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} delete network.lan$indice - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit + local indice=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$1].instance` + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q delete cwmp.@object[$1] + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q delete network.lan$indice + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q commit freecwmp_output "" "" "" "" "" "0" } @@ -222,11 +222,11 @@ return $FAULT_CPE_INVALID_PARAMETER_NAME delete_lan_device() { local _parm="$1" local i=0 -while [ \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null`" != "$_parm" \) -a \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null`" != "" \) ] +while [ \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null`" != "$_parm" \) -a \( "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null`" != "" \) ] do let i=$i+1 done -if [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@object[$i].parameter 2>/dev/null`" = "" ]; then +if [ "`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@object[$i].parameter 2>/dev/null`" = "" ]; then return $FAULT_CPE_INVALID_PARAMETER_NAME fi case "${_parm%.*.}." in diff --git a/src/scripts/functions/management_server b/src/scripts/functions/management_server index 971de51..de9956e 100644 --- a/src/scripts/functions/management_server +++ b/src/scripts/functions/management_server @@ -11,7 +11,7 @@ local permissions="" local parm="InternetGatewayDevice.ManagementServer.URL" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.acs.url 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.url 2> /dev/null` ;; get_name) permissions="0" @@ -29,7 +29,7 @@ local type="xsd:string" case "$action" in set_value) local url=$1 - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.acs.url="$url" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.url="$url" freecwmp_notify "$parm" "$url" "$type" ;; set_notification) @@ -45,7 +45,7 @@ local permissions="" local parm="InternetGatewayDevice.ManagementServer.Username" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.acs.userid 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.userid 2> /dev/null` ;; get_name) permissions="0" @@ -62,7 +62,7 @@ local val=$1 local parm="InternetGatewayDevice.ManagementServer.Username" case "$action" in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.acs.userid="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.userid="$val" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val" @@ -76,7 +76,7 @@ local permissions="" local parm="InternetGatewayDevice.ManagementServer.Password" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.acs.passwd 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.passwd 2> /dev/null` ;; get_name) permissions="0" @@ -93,7 +93,7 @@ local val=$1 local parm="InternetGatewayDevice.ManagementServer.Password" case "$action" in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.acs.passwd="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.passwd="$val" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val" @@ -107,7 +107,7 @@ local permissions="" local parm="InternetGatewayDevice.ManagementServer.ParameterKey" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.acs.ParameterKey 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.ParameterKey 2> /dev/null` ;; get_name) permissions="0" @@ -125,7 +125,7 @@ local type="xsd:string" local val="$1" case "$action" in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.acs.ParameterKey="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.ParameterKey="$val" freecwmp_notify "$parm" "$val" "$type" ;; set_notification) @@ -141,7 +141,7 @@ local parm="InternetGatewayDevice.ManagementServer.PeriodicInformEnable" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.acs.periodic_inform_enable` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.periodic_inform_enable` ;; get_name) permissions="1" @@ -158,7 +158,7 @@ local val=$1 local parm="InternetGatewayDevice.ManagementServer.PeriodicInformEnable" case "$action" in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.acs.periodic_inform_enable="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.periodic_inform_enable="$val" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val" @@ -173,7 +173,7 @@ local parm="InternetGatewayDevice.ManagementServer.PeriodicInformInterval" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.acs.periodic_inform_interval 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.periodic_inform_interval 2> /dev/null` ;; get_name) permissions="1" @@ -190,7 +190,7 @@ local val=$1 local parm="InternetGatewayDevice.ManagementServer.PeriodicInformInterval" case "$action" in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.acs.periodic_inform_interval="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.periodic_inform_interval="$val" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val" @@ -209,8 +209,8 @@ case "$action" in FLAGS_value=${FLAGS_TRUE} local tmp_json=${FLAGS_json} FLAGS_json=${FLAGS_FALSE} - local ip=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -P /var/state get cwmp.cpe.ip` - local port=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.cpe.port` + local ip=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q -P /var/state get cwmp.cpe.ip` + local port=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.cpe.port` FLAGS_value=$tmp_value FLAGS_json=$tmp_json @@ -237,7 +237,7 @@ local parm="InternetGatewayDevice.ManagementServer.ConnectionRequestUsername" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.cpe.userid 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.cpe.userid 2> /dev/null` ;; get_name) val="0" @@ -254,7 +254,7 @@ local val=$1 local parm="InternetGatewayDevice.ManagementServer.ConnectionRequestUsername" case "$action" in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.cpe.userid="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.cpe.userid="$val" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val" @@ -268,7 +268,7 @@ local parm="InternetGatewayDevice.ManagementServer.ConnectionRequestPassword" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.cpe.passwd 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.cpe.passwd 2> /dev/null` ;; get_name) permissions="0" @@ -285,7 +285,7 @@ local val=$1 local parm="InternetGatewayDevice.ManagementServer.ConnectionRequestPassword" case "$action" in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.cpe.passwd="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.cpe.passwd="$val" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val" @@ -301,7 +301,7 @@ local permissions="" local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Scheme" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@acs[0].scheme 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@acs[0].scheme 2> /dev/null` ;; get_name) permissions="1" @@ -318,7 +318,7 @@ local val=$1 local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Scheme" case "$action" in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.@acs[0].scheme="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@acs[0].scheme="$val" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val" @@ -332,7 +332,7 @@ local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Hostname" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@acs[0].hostname 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@acs[0].hostname 2> /dev/null` ;; get_name) permissions="1" @@ -350,9 +350,9 @@ local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Hostname" case "$action" in set_value) if [ -z "$default_management_server_acs_hostname" ]; then - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.@acs[0].hostname="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@acs[0].hostname="$val" else - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.@acs[0].hostname="$default_management_server_acs_hostname" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@acs[0].hostname="$default_management_server_acs_hostname" fi ;; set_notification) @@ -367,7 +367,7 @@ local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Port" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@acs[0].port 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@acs[0].port 2> /dev/null` ;; get_name) permissions="1" @@ -384,7 +384,7 @@ local val=$1 local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Port" case "$action" in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.@acs[0].port="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@acs[0].port="$val" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val" @@ -398,7 +398,7 @@ local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Path" local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@acs[0].path 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@acs[0].path 2> /dev/null` ;; get_name) permissions="1" @@ -415,7 +415,7 @@ local val=$1 local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Path" case "$action" in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.@acs[0].path="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@acs[0].path="$val" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val" @@ -429,7 +429,7 @@ local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__Connection_Re local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get cwmp.@local[0].port 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@local[0].port 2> /dev/null` ;; get_name) permissions="1" @@ -446,7 +446,7 @@ local val=$1 local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__Connection_Request_Port" case "$action" in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set cwmp.@local[0].port="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@local[0].port="$val" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val" diff --git a/src/scripts/functions/wan_device b/src/scripts/functions/wan_device index 4247d3d..96d65e7 100644 --- a/src/scripts/functions/wan_device +++ b/src/scripts/functions/wan_device @@ -51,7 +51,7 @@ local permissions="" case "$action" in get_value) if [ -z "$default_wan_device_mng_interface_mac" ]; then - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get network.mng.macaddr` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get network.mng.macaddr` else val=$default_wan_device_mng_interface_mac fi @@ -73,7 +73,7 @@ local parm="InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnec local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get network.wan.auto 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get network.wan.auto 2> /dev/null` if [ -z $val ]; then val="1" fi @@ -94,10 +94,10 @@ local parm="InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnec case $action in set_value) if [ "$val" -eq 0 ]; then - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set network.wan.auto=0 + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set network.wan.auto=0 ifdown wan & elif [ "$val" -eq 1 ]; then - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set network.wan.auto=1 + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set network.wan.auto=1 ifup wan & fi ;; @@ -113,7 +113,7 @@ local parm="InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnec local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get network.wan.username 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get network.wan.username 2> /dev/null` ;; get_name) permissions="1" @@ -130,7 +130,7 @@ local val=$1 local parm="InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Username" case $action in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set network.wan.username="$val" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set network.wan.username="$val" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val" @@ -144,7 +144,7 @@ local parm="InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnec local permissions="" case "$action" in get_value) - val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get network.wan.password 2> /dev/null` + val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get network.wan.password 2> /dev/null` ;; get_name) permissions="1" @@ -161,7 +161,7 @@ local val=$1 local parm="InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Password" case $action in set_value) - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set network.wan.password="$1" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set network.wan.password="$1" ;; set_notification) freecwmp_set_parameter_notification "$parm" "$val"