summaryrefslogtreecommitdiff
path: root/templates/traceroute/ipv6
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-08-17 19:36:11 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-10-27 17:11:28 -0500
commit1f8755e7fa091ae705eda151882424d4e95e1832 (patch)
tree9ef2a6ad90123d9e1ffda62b9eed1944a291a5f1 /templates/traceroute/ipv6
parent909267c0ba0bf6c92e14150313e3e3f6958753ea (diff)
downloadvyatta-op-1f8755e7fa091ae705eda151882424d4e95e1832.tar.gz
vyatta-op-1f8755e7fa091ae705eda151882424d4e95e1832.zip
Initial traceroute rework checkin
(cherry picked from commit ce64904840bea3e716a7de3eca2618e63bcd87d1)
Diffstat (limited to 'templates/traceroute/ipv6')
-rw-r--r--templates/traceroute/ipv6/node.def4
-rw-r--r--templates/traceroute/ipv6/node.tag/node.def25
2 files changed, 29 insertions, 0 deletions
diff --git a/templates/traceroute/ipv6/node.def b/templates/traceroute/ipv6/node.def
new file mode 100644
index 0000000..1075c44
--- /dev/null
+++ b/templates/traceroute/ipv6/node.def
@@ -0,0 +1,4 @@
+#
+# Operational mode template for the "traceroute" command
+#
+help: Track network path to <hostname|IPv6 address>
diff --git a/templates/traceroute/ipv6/node.tag/node.def b/templates/traceroute/ipv6/node.tag/node.def
new file mode 100644
index 0000000..b746c3e
--- /dev/null
+++ b/templates/traceroute/ipv6/node.tag/node.def
@@ -0,0 +1,25 @@
+#
+# Operational mode template for the "traceroute" command
+#
+
+help: Track network path to specified <hostname|IPv6 address>
+allowed: echo -n '<hostname> <h:h:h:h:h:h:h:h>'
+
+run:
+ if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $3
+ then
+ /usr/bin/traceroute6 $3
+ echo
+ else
+ if cat /etc/resolv.conf 2> /dev/null | grep -q nameserver
+ then
+ if /usr/bin/host $3 &> /dev/null
+ then
+ /usr/bin/traceroute6 $3
+ else
+ echo "Invalid IPv6 address or host name '$3'"
+ fi
+ else
+ echo "Either enter a valid IPv6 address or configure Domain Name Server to resolve host names"
+ fi
+ fi