Author: blogic
Date: 2014-06-05 10:19:59 +0200 (Thu, 05 Jun 2014)
New Revision: 41006

Modified:
   trunk/package/system/procd/files/procd.sh
Log:
procd: rename local variable in uci_validate_section

Allow to use "package", "type", "name", "error" and "result"
as config option names:

package some_service
config section 'foo'
    option name 'bar'
    option type 'unknown'

Signed-off-by: Maxim Storchak <[email protected]>

Modified: trunk/package/system/procd/files/procd.sh
===================================================================
--- trunk/package/system/procd/files/procd.sh   2014-06-05 08:19:52 UTC (rev 
41005)
+++ trunk/package/system/procd/files/procd.sh   2014-06-05 08:19:59 UTC (rev 
41006)
@@ -219,16 +219,16 @@
 
 uci_validate_section()
 {
-       local package="$1"
-       local type="$2"
-       local name="$3"
-       local error
+       local _package="$1"
+       local _type="$2"
+       local _name="$3"
+       local _error
        shift; shift; shift
-       local result=`/sbin/validate_data "$package" "$type" "$name" "$@" 2> 
/dev/null`
-       error=$?
-       eval "$result"
-       [ "$error" = "0" ] || `/sbin/validate_data "$package" "$type" "$name" 
"$@" 1> /dev/null`
-       return $error
+       local _result=`/sbin/validate_data "$_package" "$_type" "$_name" "$@" 
2> /dev/null`
+       _error=$?
+       eval "$_result"
+       [ "$_error" = "0" ] || `/sbin/validate_data "$_package" "$_type" 
"$_name" "$@" 1> /dev/null`
+       return $_error
 }
 
 _procd_wrapper \
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to