summaryrefslogtreecommitdiff
path: root/templates/traceroute
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2008-03-26 20:28:54 +0000
committerMohit Mehta <mohit.mehta@vyatta.com>2008-03-26 20:28:54 +0000
commit00950b2a56361cb71fb4bf3070667ae4bd593e5b (patch)
treecdcd24d40df2db11a61e53cbe8e85b733597912f /templates/traceroute
parentfe0ea967e6c2e1952b3c5d92df1179a2ee7664c8 (diff)
downloadvyatta-op-00950b2a56361cb71fb4bf3070667ae4bd593e5b.tar.gz
vyatta-op-00950b2a56361cb71fb4bf3070667ae4bd593e5b.zip
Fix Bug 2871 Internal errors reported with traceroute
- used the host command to check if the host exists, if yes only then traceroute to it
Diffstat (limited to 'templates/traceroute')
-rw-r--r--templates/traceroute/node.tag/node.def7
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/traceroute/node.tag/node.def b/templates/traceroute/node.tag/node.def
index 87d9c32..f183741 100644
--- a/templates/traceroute/node.tag/node.def
+++ b/templates/traceroute/node.tag/node.def
@@ -5,4 +5,9 @@
allowed:
vyatta-allowed-hosts
-run: /usr/sbin/traceroute $2
+run: if /usr/bin/host $2 &>/dev/null
+ then
+ /usr/bin/traceroute $2
+ else
+ echo Cannot identify $2
+ fi