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 <m.storchak@gmail.com>

SVN-Revision: 41006
master
John Crispin 10 years ago
parent 7a03f41940
commit 59c8b70839
  1. 18
      package/system/procd/files/procd.sh

@ -219,16 +219,16 @@ _procd_kill() {
uci_validate_section() uci_validate_section()
{ {
local package="$1" local _package="$1"
local type="$2" local _type="$2"
local name="$3" local _name="$3"
local error local _error
shift; shift; shift shift; shift; shift
local result=`/sbin/validate_data "$package" "$type" "$name" "$@" 2> /dev/null` local _result=`/sbin/validate_data "$_package" "$_type" "$_name" "$@" 2> /dev/null`
error=$? _error=$?
eval "$result" eval "$_result"
[ "$error" = "0" ] || `/sbin/validate_data "$package" "$type" "$name" "$@" 1> /dev/null` [ "$_error" = "0" ] || `/sbin/validate_data "$_package" "$_type" "$_name" "$@" 1> /dev/null`
return $error return $_error
} }
_procd_wrapper \ _procd_wrapper \

Loading…
Cancel
Save