From 0f78fcfe3c21e4d07b402aaae75bb494fc4e4133 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Wed, 6 Aug 2008 13:14:14 +0000 Subject: tighten syntax check --- templates/service/dns/forwarding/ignore-interface/node.def | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/service/dns/forwarding/ignore-interface/node.def b/templates/service/dns/forwarding/ignore-interface/node.def index f3c80832..5bf20fa0 100644 --- a/templates/service/dns/forwarding/ignore-interface/node.def +++ b/templates/service/dns/forwarding/ignore-interface/node.def @@ -2,11 +2,12 @@ multi: type: txt help: Set interface to ignore DNS queries on syntax:expression: exec " - intf_array=($(awk '$1 ~ /:$/ { print $1 }' /proc/net/dev)) + intf_array=($(awk '$1 ~ /:/ { print $1 }' /proc/net/dev)) intf_array_len=${#intf_array[*]} i=0 while [ $i -lt $intf_array_len ]; do - if [ \"${intf_array[$i]}\" == \"$VAR(@):\" ] ; then + temp=${intf_array[$i]%:*} + if [ \"$temp\" == \"$VAR(@)\" ] ; then exit 0 fi let i++ -- cgit v1.2.3