diff options
author | John Crispin <john@openwrt.org> | 2014-06-05 08:19:59 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2014-06-05 08:19:59 +0000 |
commit | 59c8b70839f69acf4a087b02c441bfe49f593462 (patch) | |
tree | 79492a91bdd9420b9267b70f0b7460163c568bca /package | |
parent | 7a03f41940e51f45d94b0fc2282be84614c9246e (diff) | |
download | mtk-20170518-59c8b70839f69acf4a087b02c441bfe49f593462.zip mtk-20170518-59c8b70839f69acf4a087b02c441bfe49f593462.tar.gz mtk-20170518-59c8b70839f69acf4a087b02c441bfe49f593462.tar.bz2 |
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
Diffstat (limited to 'package')
-rw-r--r-- | package/system/procd/files/procd.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index c5dc3c6..d83c067 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -219,16 +219,16 @@ _procd_kill() { 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 \ |