From d884817a4643d15d3a7a7c9b3a814cec49b373f1 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Mon, 16 Aug 2010 18:51:35 -0700 Subject: remove more low-level config dir usages --- templates/system/static-host-mapping/host-name/node.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/system') 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" -- cgit v1.2.3