summaryrefslogtreecommitdiff
path: root/templates/traceroute6
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-07-29 10:24:29 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-07-29 10:24:29 -0700
commit54d18d355f8a0cbb02c82dff616b8588a5aa80d0 (patch)
treef213f28822d683b6b3bd639c569461b9b1e6798c /templates/traceroute6
parent9fa05e4f5b97f604cf610b29626a1a41ab1a044c (diff)
downloadvyatta-op-54d18d355f8a0cbb02c82dff616b8588a5aa80d0.tar.gz
vyatta-op-54d18d355f8a0cbb02c82dff616b8588a5aa80d0.zip
Add some ipv6 op mode commands.
Diffstat (limited to 'templates/traceroute6')
-rw-r--r--templates/traceroute6/node.def4
-rw-r--r--templates/traceroute6/node.tag/node.def26
2 files changed, 30 insertions, 0 deletions
diff --git a/templates/traceroute6/node.def b/templates/traceroute6/node.def
new file mode 100644
index 0000000..1075c44
--- /dev/null
+++ b/templates/traceroute6/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/traceroute6/node.tag/node.def b/templates/traceroute6/node.tag/node.def
new file mode 100644
index 0000000..5148e6d
--- /dev/null
+++ b/templates/traceroute6/node.tag/node.def
@@ -0,0 +1,26 @@
+#
+# Operational mode template for the "traceroute" command
+#
+
+help: Track network path to specified <hostname|IPv6 address>
+allowed:
+ vyatta-allowed-hosts
+
+run:
+ if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $2
+ then
+ /usr/bin/traceroute6 $2
+ echo
+ else
+ if cat /etc/resolv.conf 2> /dev/null | grep -q nameserver
+ then
+ if /usr/bin/host $2 &> /dev/null
+ then
+ /usr/bin/traceroute6 $2
+ else
+ echo "Invalid IPv6 address or host name '$2'"
+ fi
+ else
+ echo "Either enter a valid IPv6 address or configure Domain Name Server to resolve host names"
+ fi
+ fi