diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-08-06 13:14:14 +0000 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-08-06 13:14:14 +0000 |
commit | 0f78fcfe3c21e4d07b402aaae75bb494fc4e4133 (patch) | |
tree | a75b91de0e383327f376d2ca681bcb0fc5876f40 | |
parent | b09a999b8284895f5a8ff0233051a41b61eb690a (diff) | |
download | vyatta-cfg-system-0f78fcfe3c21e4d07b402aaae75bb494fc4e4133.tar.gz vyatta-cfg-system-0f78fcfe3c21e4d07b402aaae75bb494fc4e4133.zip |
tighten syntax check
-rw-r--r-- | templates/service/dns/forwarding/ignore-interface/node.def | 5 |
1 files changed, 3 insertions, 2 deletions
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++ |