aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/procd/files/procd.sh
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-06-30 09:57:29 +0000
committerJohn Crispin <john@openwrt.org>2014-06-30 09:57:29 +0000
commit9912d02fa1d0e0f4a484180d23c812223bde7e11 (patch)
treef8d2b85574c15da3b84027ac50880c8af58b50ae /package/system/procd/files/procd.sh
parenta7863b1368b7cd2c6486acf3cac111905ac2cfb0 (diff)
downloadupstream-9912d02fa1d0e0f4a484180d23c812223bde7e11.tar.gz
upstream-9912d02fa1d0e0f4a484180d23c812223bde7e11.tar.bz2
upstream-9912d02fa1d0e0f4a484180d23c812223bde7e11.zip
procd: fix uci_validation
Regardles of the return code from validate_data _error variable will be 0 due to 'local' command in the previous line. With this patch we are able to catch the return code from validate_data tool. Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 41414
Diffstat (limited to 'package/system/procd/files/procd.sh')
-rw-r--r--package/system/procd/files/procd.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 67924a2749..c5fd512486 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -269,9 +269,10 @@ uci_validate_section()
local _package="$1"
local _type="$2"
local _name="$3"
+ local _result
local _error
shift; shift; shift
- local _result=`/sbin/validate_data "$_package" "$_type" "$_name" "$@" 2> /dev/null`
+ _result=`/sbin/validate_data "$_package" "$_type" "$_name" "$@" 2> /dev/null`
_error=$?
eval "$_result"
[ "$_error" = "0" ] || `/sbin/validate_data "$_package" "$_type" "$_name" "$@" 1> /dev/null`