freecwmp
[Top] [All Lists]

Re: [PATCH 06/27] Update device_routing script to support communicte dat

To: mohamed.kallel@pivasoftware.com
Subject: Re: [PATCH 06/27] Update device_routing script to support communicte data of get parameter values to the core via ubus Contributed by Inteno Broadband Technology AB
From: Luka Perkov <freecwmp@lukaperkov.net>
Date: Sat, 8 Dec 2012 11:36:21 +0100
Cc: freecwmp@linux-mips.org, ahmed.zribi@pivasoftware.com, freecwmp@lukaperkov.net, jogo@openwrt.org
In-reply-to: <1354809292-2467-7-git-send-email-mohamed.kallel@pivasoftware.com>
Mail-followup-to: mohamed.kallel@pivasoftware.com, freecwmp@linux-mips.org, ahmed.zribi@pivasoftware.com, jogo@openwrt.org
Original-recipient: rfc822;freecwmp@linux-mips.org
References: <mohamed.kallel@pivasoftware.com> <1354809292-2467-1-git-send-email-mohamed.kallel@pivasoftware.com> <1354809292-2467-7-git-send-email-mohamed.kallel@pivasoftware.com>
Sender: freecwmp-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Dec 06, 2012 at 04:54:31PM +0100, Mohamed wrote:
> 
> Signed-off-by: Ahmed ZRIBI <ahmed.zribi@pivasoftware.com>
> Signed-off-by: Mohamed <mohamed.kallel@pivasoftware.com>

NACK. Look at comment from patch v4.

> ---
>  ext/openwrt/scripts/functions/device_routing |   33 +++++++++++++------------
>  1 files changed, 17 insertions(+), 16 deletions(-)
> 
> diff --git a/ext/openwrt/scripts/functions/device_routing 
> b/ext/openwrt/scripts/functions/device_routing
> index 3dfa418..ca6dab1 100644
> --- a/ext/openwrt/scripts/functions/device_routing
> +++ b/ext/openwrt/scripts/functions/device_routing
> @@ -85,7 +85,7 @@ local parameter=$1
>  
>  case "$parameter" in
>       Device.Routing.RouterNumberOfEntries)
> -     freecwmp_output "$parameter" "1"
> +     ubus_freecwmp_output "$parameter" "1"
>       return
>       ;;
>  esac
> @@ -101,7 +101,7 @@ if [ $rc -eq 0 ]; then
>       else
>               val="0"
>       fi
> -     freecwmp_output "$parameter" "$val"
> +     ubus_freecwmp_output "$parameter" "$val"
>       return
>  fi
>  
> @@ -113,7 +113,7 @@ if [ $rc -eq 0 ]; then
>       else
>               val="Disabled"
>       fi
> -     freecwmp_output "$parameter" "$val"
> +     ubus_freecwmp_output "$parameter" "$val"
>       return
>  fi
>  
> @@ -134,7 +134,7 @@ if [ $rc -eq 0 ]; then
>       else
>               return
>       fi
> -     freecwmp_output "$parameter" "$total"
> +     ubus_freecwmp_output "$parameter" "$total"
>       return
>  fi
>  
> @@ -146,7 +146,7 @@ if [ $rc -eq 0 ]; then
>       else
>               return
>       fi
> -     freecwmp_output "$parameter" "$val"
> +     ubus_freecwmp_output "$parameter" "$val"
>       return
>  fi
>  
> @@ -166,15 +166,15 @@ if [ $rc -eq 0 ]; then
>                       return
>               fi
>               if [ $num2 -gt $static ]; then
> -                     freecwmp_output "$parameter" "Enabled"
> +                     ubus_freecwmp_output "$parameter" "Enabled"
>                       return
>               fi
>               if [ $num2 -le $inactive ]; then
> -                     freecwmp_output "$parameter" "Error: not active but 
> enabled"
> +                     ubus_freecwmp_output "$parameter" "Error: not active 
> but enabled"
>                       return
>               fi
>               if [ $num2 -le $static ]; then
> -                     freecwmp_output "$parameter" "Enabled"
> +                     ubus_freecwmp_output "$parameter" "Enabled"
>                       return
>               fi
>       else
> @@ -197,11 +197,11 @@ if [ $rc -eq 0 ]; then
>                       return
>               fi
>               if [ $num2 -gt $static ]; then
> -                     freecwmp_output "$parameter" "0"
> +                     ubus_freecwmp_output "$parameter" "0"
>                       return
>               fi
>               if [ $num2 -le $static ]; then
> -                     freecwmp_output "$parameter" "1"
> +                     ubus_freecwmp_output "$parameter" "1"
>                       return
>               fi
>       else
> @@ -230,7 +230,7 @@ if [ $rc -eq 0 ]; then
>                       let local i=$static-$num2
>                       target=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} 
> get network.@route[$i].target 2> /dev/null`
>               fi
> -             freecwmp_output "$parameter" "$target"
> +             ubus_freecwmp_output "$parameter" "$target"
>               return
>       else
>               return
> @@ -258,7 +258,7 @@ if [ $rc -eq 0 ]; then
>                       let local i=$static-$num2
>                       netmask=`/sbin/uci ${UCI_CONFIG_DIR:+-c 
> $UCI_CONFIG_DIR} get network.@route[$i].netmask 2> /dev/null`
>               fi
> -             freecwmp_output "$parameter" "$netmask"
> +             ubus_freecwmp_output "$parameter" "$netmask"
>               return
>       else
>               return
> @@ -288,7 +288,7 @@ if [ $rc -eq 0 ]; then
>                       let local i=$static-$num2
>                       gateway=`/sbin/uci ${UCI_CONFIG_DIR:+-c 
> $UCI_CONFIG_DIR} get network.@route[$i].gateway 2> /dev/null`
>               fi
> -             freecwmp_output "$parameter" "$gateway"
> +             ubus_freecwmp_output "$parameter" "$gateway"
>               return
>       else
>               return
> @@ -315,7 +315,7 @@ if [ $rc -eq 0 ]; then
>               elif [ $num2 -le $static ]; then
>                       val="Static"
>               fi
> -             freecwmp_output "$parameter" "$val"
> +             ubus_freecwmp_output "$parameter" "$val"
>               return
>       else
>               return
> @@ -343,11 +343,12 @@ if [ $rc -eq 0 ]; then
>                       let local i=$static-$num2
>                       metric=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} 
> get network.@route[$i].metric 2> /dev/null`
>               fi
> -             freecwmp_output "$parameter" "$metric"
> +             ubus_freecwmp_output "$parameter" "$metric"
>               return
>       else
>               return
>       fi
>  fi
> -
> +return $FAULT_CPE_INVALID_PARAMETER_NAME
>  }
> +
> -- 
> 1.7.4.1

Luka 

<Prev in Thread] Current Thread [Next in Thread>