diff options
Diffstat (limited to 'templates/traceroute/ipv6')
-rw-r--r-- | templates/traceroute/ipv6/node.def | 4 | ||||
-rw-r--r-- | templates/traceroute/ipv6/node.tag/node.def | 25 |
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 |