procd: fix uci_validation
authorJohn Crispin <john@openwrt.org>
Mon, 30 Jun 2014 09:57:29 +0000 (09:57 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 30 Jun 2014 09:57:29 +0000 (09:57 +0000)
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

package/system/procd/Makefile
package/system/procd/files/procd.sh

index 6553fcc8317de790c01fd3af7fd6346a9dbcbf6d..30bcd2a7f2cf1a80ed71d0b1d8bbb426ed2dec59 100644 (file)
@@ -1,7 +1,14 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=procd
-PKG_VERSION:=2014-06-19
+PKG_VERSION:=2014-06-27
 
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
index 67924a27491e062dc75375c9fdc52b2007e86dc3..c5fd512486990c9018d8530395d3f31e4aa24b1d 100644 (file)
@@ -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`