freecwmp
[Top] [All Lists]

Re: [PATCH 07/27] Update device_users script to support communicte data

To: mohamed.kallel@pivasoftware.com
Subject: Re: [PATCH 07/27] Update device_users 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:37:33 +0100
Cc: freecwmp@linux-mips.org, ahmed.zribi@pivasoftware.com, freecwmp@lukaperkov.net, jogo@openwrt.org
In-reply-to: <1354809292-2467-8-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-8-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:32PM +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_users |   13 +++++++------
>  1 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/ext/openwrt/scripts/functions/device_users 
> b/ext/openwrt/scripts/functions/device_users
> index 0d377f7..d8dba61 100644
> --- a/ext/openwrt/scripts/functions/device_users
> +++ b/ext/openwrt/scripts/functions/device_users
> @@ -6,7 +6,7 @@ local parameter="$1"
>  case "$parameter" in
>       Device.Users.UserNumberOfEntries)
>       local val=`wc -l /etc/passwd | awk '{ print $1 }'`
> -     freecwmp_value_output "$parameter" "$val"
> +     ubus_freecwmp_output "$parameter" "$val"
>       return
>       ;;
>  esac
> @@ -21,7 +21,7 @@ if [ $rc -eq 0 ]; then
>       # TODO: this is very system dependent, for now just look at users shell
>       local sed_cmd=`echo -n \'$num; echo p\'`
>       local val=`eval sed -n $sed_cmd /etc/passwd | grep -v '/bin/false' | wc 
> -l`
> -     freecwmp_value_output "$parameter" "$val"
> +     ubus_freecwmp_output "$parameter" "$val"
>       return
>  fi
>  
> @@ -30,7 +30,7 @@ if [ $rc -eq 0 ]; then
>       # TODO: this is very system dependent, for now just look at users shell
>       local sed_cmd=`echo -n \'$num; echo p\'`
>       local val=`eval sed -n $sed_cmd /etc/passwd | grep -v '/bin/false' | wc 
> -l`
> -     freecwmp_value_output "$parameter" "$val"
> +     ubus_freecwmp_output "$parameter" "$val"
>       return
>  fi
>  
> @@ -38,7 +38,7 @@ freecwmp_parse_formated_parameter "$parameter" 
> "Device.Users.User.{i}.Username"
>  if [ $rc -eq 0 ]; then
>       local sed_cmd=`echo -n \'$num; echo p\'`
>       local val=`eval sed -n $sed_cmd /etc/passwd | awk -F ':' '{ print $1 }'`
> -     freecwmp_value_output "$parameter" "$val"
> +     ubus_freecwmp_output "$parameter" "$val"
>       return
>  fi
>  
> @@ -48,15 +48,16 @@ if [ $rc -eq 0 ]; then
>       #   local sed_cmd=`echo -n \'$num; echo p\'`
>       #   local val=`eval sed -n $sed_cmd /etc/shadow | awk -F ':' '{ print 
> $2 }'`
>       #   freecwmp_value_output "$parameter" "$val"
> -     freecwmp_value_output "$parameter" ""
> +     ubus_freecwmp_output "$parameter" ""
>       return
>  fi
>  
>  freecwmp_parse_formated_parameter "$parameter" 
> "Device.Users.User.{i}.Language" "rc" "num"
>  if [ $rc -eq 0 ]; then
> -     freecwmp_value_output "$parameter" ""
> +     ubus_freecwmp_output "$parameter" ""
>       return
>  fi
> +return $FAULT_CPE_INVALID_PARAMETER_NAME
>  }
>  
>  set_device_users() {
> -- 
> 1.7.4.1

Luka 

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