From 191e65ef3b695d5185d055d0346e2279c808b497 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 12 Aug 2010 14:12:12 -0700 Subject: remove "node.val" usages * use new cli-shell-api instead --- .../zone/node.tag/from/node.tag/firewall/ipv6-name/node.def | 3 ++- .../zone-policy/zone/node.tag/from/node.tag/firewall/name/node.def | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/zone-policy/zone/node.tag/from/node.tag/firewall/ipv6-name/node.def b/templates/zone-policy/zone/node.tag/from/node.tag/firewall/ipv6-name/node.def index 329c7877..dd098ba2 100644 --- a/templates/zone-policy/zone/node.tag/from/node.tag/firewall/ipv6-name/node.def +++ b/templates/zone-policy/zone/node.tag/from/node.tag/firewall/ipv6-name/node.def @@ -34,7 +34,8 @@ update: fi # need to undo previous ruleset here first - old_ruleset=`cat /opt/vyatta/config/active/zone-policy/zone/$VAR(../../../@)/from/$VAR(../../@)/firewall/ipv6-name/node.val` + old_ruleset=$(cli-shell-api returnActiveValue zone-policy zone \ + $VAR(../../../@) from $VAR(../../@) firewall ipv6-name) if ! /opt/vyatta/sbin/vyatta-zone.pl \ --action=delete-fromzone-fw \ --zone-name="$VAR(../../../@)" \ diff --git a/templates/zone-policy/zone/node.tag/from/node.tag/firewall/name/node.def b/templates/zone-policy/zone/node.tag/from/node.tag/firewall/name/node.def index 62a5d4cc..b1833f3c 100644 --- a/templates/zone-policy/zone/node.tag/from/node.tag/firewall/name/node.def +++ b/templates/zone-policy/zone/node.tag/from/node.tag/firewall/name/node.def @@ -34,8 +34,9 @@ update: exit 1 fi - # need to undo previous ruleset here first - old_ruleset=`cat /opt/vyatta/config/active/zone-policy/zone/$VAR(../../../@)/from/$VAR(../../@)/firewall/name/node.val` + # need to undo previous ruleset here first + old_ruleset=$(cli-shell-api returnActiveValue zone-policy zone \ + $VAR(../../../@) from $VAR(../../@) firewall name) if ! /opt/vyatta/sbin/vyatta-zone.pl \ --action=delete-fromzone-fw \ --zone-name="$VAR(../../../@)" \ -- cgit v1.2.3