Skip to content
Snippets Groups Projects
Commit 9912d02f authored by John Crispin's avatar John Crispin
Browse files

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: default avatarLuka Perkov <luka@openwrt.org>

SVN-Revision: 41414
parent a7863b13
No related branches found
No related tags found
No related merge requests found
#
# 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)
......
......@@ -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`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment