summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-08-16 18:51:35 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-08-16 18:51:35 -0700
commitd884817a4643d15d3a7a7c9b3a814cec49b373f1 (patch)
tree9dab4446e5b53586ffb795a6ce9acc60679c0cf9 /templates
parenta6ec2ff6532ce855c1593bf28bef7df188701688 (diff)
downloadvyatta-cfg-quagga-d884817a4643d15d3a7a7c9b3a814cec49b373f1.tar.gz
vyatta-cfg-quagga-d884817a4643d15d3a7a7c9b3a814cec49b373f1.zip
remove more low-level config dir usages
Diffstat (limited to 'templates')
-rw-r--r--templates/system/static-host-mapping/host-name/node.def4
-rw-r--r--templates/zone-policy/zone/node.tag/from/node.def4
-rw-r--r--templates/zone-policy/zone/node.tag/from/node.tag/firewall/ipv6-name/node.def4
-rw-r--r--templates/zone-policy/zone/node.tag/from/node.tag/firewall/name/node.def4
4 files changed, 8 insertions, 8 deletions
diff --git a/templates/system/static-host-mapping/host-name/node.def b/templates/system/static-host-mapping/host-name/node.def
index 693b5592..09bc9dbe 100644
--- a/templates/system/static-host-mapping/host-name/node.def
+++ b/templates/system/static-host-mapping/host-name/node.def
@@ -12,10 +12,10 @@ end: sudo sh -c "
touch /etc/hosts
sed -i '/ $VAR(@) .*#vyatta entry/d' /etc/hosts
if [ -z \"$VAR(./inet/@)\" ]; then
- if [ -d /opt/vyatta/config/active/service/dns/forwarding ]; then /etc/init.d/dnsmasq restart >&/dev/null; fi
+ if cli-shell-api existsActive service dns forwarding; then /etc/init.d/dnsmasq restart >&/dev/null; fi
exit 0
fi
declare -a aliases=( $VAR(alias/@@) )
echo -e \"$VAR(inet/@)\\t $VAR(@) \${aliases[*]} \\t #vyatta entry\" >> /etc/hosts
- if [ -d /opt/vyatta/config/active/service/dns/forwarding ]; then /etc/init.d/dnsmasq restart >&/dev/null; fi"
+ if cli-shell-api existsActive service dns forwarding; then /etc/init.d/dnsmasq restart >&/dev/null; fi"
diff --git a/templates/zone-policy/zone/node.tag/from/node.def b/templates/zone-policy/zone/node.tag/from/node.def
index 3ce5a328..4aeb199d 100644
--- a/templates/zone-policy/zone/node.tag/from/node.def
+++ b/templates/zone-policy/zone/node.tag/from/node.def
@@ -5,8 +5,8 @@ help: Zone from which to filter traffic
allowed:
local -a zones ;
- zones=( /opt/vyatta/config/active/zone-policy/zone/* )
- echo -n ${zones[@]##*/}
+ eval "zones=($(cli-shell-api listActiveNodes zone-policy zone))"
+ echo -n "${zones[@]}"
begin:
if ! /opt/vyatta/sbin/vyatta-zone.pl --action=validity-checks --zone-name=none --silent-validate=true; then
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 dd098ba2..391a66bc 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
@@ -3,8 +3,8 @@ help: IPv6 firewall ruleset
allowed:
local -a params ;
- params=( /opt/vyatta/config/active/firewall/ipv6-name/* )
- echo -n ${params[@]##*/}
+ eval "params=($(cli-shell-api listActiveNodes firewall ipv6-name))"
+ echo -n "${params[@]}"
create:
if ! /opt/vyatta/sbin/vyatta-zone.pl \
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 b1833f3c..605add4b 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
@@ -3,8 +3,8 @@ help: IPv4 firewall ruleset
allowed:
local -a params ;
- params=( /opt/vyatta/config/active/firewall/name/* )
- echo -n ${params[@]##*/}
+ eval "params=($(cli-shell-api listActiveNodes firewall name))"
+ echo -n "${params[@]}"
create:
if ! /opt/vyatta/sbin/vyatta-zone.pl \