From 58a5f4da6bf1772a2d20a6ae202fc6611eb4bbfc Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Wed, 6 May 2009 16:47:28 -0700 Subject: * do silent validity check when creating zone chains and adding from zone rules --- templates/zone-policy/node.def | 2 +- templates/zone-policy/zone/node.tag/from/node.def | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'templates/zone-policy') diff --git a/templates/zone-policy/node.def b/templates/zone-policy/node.def index 2633101e..c4b62433 100644 --- a/templates/zone-policy/node.def +++ b/templates/zone-policy/node.def @@ -1,5 +1,5 @@ help: Configure zone-policy begin: -if ! /opt/vyatta/sbin/vyatta-zone.pl --action=validity-checks --zone-name=none; then +if ! /opt/vyatta/sbin/vyatta-zone.pl --action=validity-checks --zone-name=none --silent-validate=false; then exit 1 fi diff --git a/templates/zone-policy/zone/node.tag/from/node.def b/templates/zone-policy/zone/node.tag/from/node.def index 5273519a..5e37f9f1 100644 --- a/templates/zone-policy/zone/node.tag/from/node.def +++ b/templates/zone-policy/zone/node.tag/from/node.def @@ -7,6 +7,11 @@ allowed: zones=( /opt/vyatta/config/active/zone-policy/zone/* ) echo -n ${zones[@]##*/} +begin: +if ! /opt/vyatta/sbin/vyatta-zone.pl --action=validity-checks --zone-name=none --silent-validate=true; then + exit 1 +fi + create: parent_zone=$VAR(../@) zones=($VAR(../@@)) -- cgit v1.2.3