summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-08-21 18:34:34 +0200
committerGitHub <noreply@github.com>2019-08-21 18:34:34 +0200
commitbbbbfe2452cb78c894209671114bf6575ca5007e (patch)
tree6d4945c8b40dc378de30f3dbf9df1e9031ed95aa
parent437867584488ec3bf1bdd28ddfdd45410e9a5bf9 (diff)
parentab4371d058f8684fcbc501be34153b0d3b3c36db (diff)
downloadvyatta-op-bbbbfe2452cb78c894209671114bf6575ca5007e.tar.gz
vyatta-op-bbbbfe2452cb78c894209671114bf6575ca5007e.zip
Merge pull request #25 from alkersan/current
T1596 Remove telnet and traceroute operations after xml-style rewrite
-rw-r--r--Makefile.am1
-rw-r--r--debian/control1
-rw-r--r--scripts/vyatta-traceroute28
-rw-r--r--templates/monitor/traceroute/node.def1
-rw-r--r--templates/monitor/traceroute/node.tag/node.def3
-rw-r--r--templates/telnet/node.def1
-rw-r--r--templates/telnet/node.tag/node.def10
-rw-r--r--templates/telnet/node.tag/node.tag/node.def9
-rw-r--r--templates/traceroute/ipv4/node.def4
-rw-r--r--templates/traceroute/ipv4/node.tag/node.def25
-rw-r--r--templates/traceroute/ipv6/node.def4
-rw-r--r--templates/traceroute/ipv6/node.tag/node.def25
-rw-r--r--templates/traceroute/node.def4
-rw-r--r--templates/traceroute/node.tag/node.def8
14 files changed, 0 insertions, 124 deletions
diff --git a/Makefile.am b/Makefile.am
index 476254b..eafd93d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,7 +34,6 @@ bin_SCRIPTS += scripts/vyatta-show-current-user
bin_SCRIPTS += scripts/tech-support-archive
bin_SCRIPTS += scripts/vyatta-op-cmd-wrapper
bin_SCRIPTS += scripts/ping
-bin_SCRIPTS += scripts/vyatta-traceroute
bin_SCRIPTS += scripts/vyatta-monitor
bin_SCRIPTS += scripts/vyatta-monitor-list
bin_SCRIPTS += scripts/vyatta-monitor-cleanup
diff --git a/debian/control b/debian/control
index 92bfbe6..ed8fb3c 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,6 @@ Architecture: all
Depends: sed (>= 4.1.5),
console-terminus,
ethtool,
- traceroute,
procps (>= 1:3.2.7-3),
vyatta-cfg (>= 0.16.26),
vyatta-cfg-system (>= 0.19.93),
diff --git a/scripts/vyatta-traceroute b/scripts/vyatta-traceroute
deleted file mode 100644
index ca87a6d..0000000
--- a/scripts/vyatta-traceroute
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-ADDR=$1
-# Regular expressions for matching an ipv4 and ipv6 address
-# simple ipv4 matcher
-ip4regex="^(25[0-5]|2[0-4][0-9]|1[0-9]{1,2}|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}$"
-# based on IPv6 regex from here: http://forums.dartware.com/viewtopic.php?t=452
-ip6regex="^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}))|:)))(%.+)?\s*$"
-
-# Main logic
-if [[ "$ADDR" =~ $ip4regex ]]; then
- /usr/bin/traceroute ${@:2} $ADDR
-elif [[ "$ADDR" =~ $ip6regex ]]; then
- /usr/bin/traceroute6 ${@:2} $ADDR
-else
- echo "Resolving Address: $ADDR"
- if host $ADDR | awk {' print $4 '} \
- | grep -m1 -E "$ip4regex">/dev/null; then
- # resolve address and check if it is ipv4 or other
- /usr/bin/traceroute ${@:2} $ADDR
- elif host $ADDR | awk {' print $5 '} \
- | grep -m1 -E "$ip6regex">/dev/null; then
- # if ipv6 resolution then ping6
- /usr/bin/traceroute6 ${@:2} $ADDR
- else
- echo -e "\n Unknown address: [$ADDR]\n"
- fi
-fi
-
diff --git a/templates/monitor/traceroute/node.def b/templates/monitor/traceroute/node.def
deleted file mode 100644
index f07e6b3..0000000
--- a/templates/monitor/traceroute/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Monitor the path to a destination in realtime
diff --git a/templates/monitor/traceroute/node.tag/node.def b/templates/monitor/traceroute/node.tag/node.def
deleted file mode 100644
index 8c522de..0000000
--- a/templates/monitor/traceroute/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Monitor the path to a destination in realtime
-allowed: echo '<hostname> <x.x.x.x> <h:h:h:h:h:h:h:h>'
-run: mtr $3
diff --git a/templates/telnet/node.def b/templates/telnet/node.def
deleted file mode 100644
index e3ec3e0..0000000
--- a/templates/telnet/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Telnet to a node
diff --git a/templates/telnet/node.tag/node.def b/templates/telnet/node.tag/node.def
deleted file mode 100644
index 76e9b0a..0000000
--- a/templates/telnet/node.tag/node.def
+++ /dev/null
@@ -1,10 +0,0 @@
-help: Telnet to host
-allowed: echo -n '<hostname> <x.x.x.x> <h:h:h:h:h:h:h:h>'
-
-run: if [ -x /usr/bin/telnet ] ; then
- /usr/bin/$*
- elif [ -x /bin/busybox ] ; then
- /bin/busybox $*
- else
- echo telnet not found
- fi
diff --git a/templates/telnet/node.tag/node.tag/node.def b/templates/telnet/node.tag/node.tag/node.def
deleted file mode 100644
index 21b78c4..0000000
--- a/templates/telnet/node.tag/node.tag/node.def
+++ /dev/null
@@ -1,9 +0,0 @@
-help: Telnet to <address> <port>
-allowed: echo -n '<0-65535>'
-run: if [ -x /usr/bin/telnet ] ; then
- /usr/bin/$*
- elif [ -x /bin/busybox ] ; then
- /bin/busybox $*
- else
- echo telnet not found
- fi
diff --git a/templates/traceroute/ipv4/node.def b/templates/traceroute/ipv4/node.def
deleted file mode 100644
index 2f618b1..0000000
--- a/templates/traceroute/ipv4/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# Operational mode template for the "traceroute" command
-#
-help: Track network path to <hostname|IPv4 address>
diff --git a/templates/traceroute/ipv4/node.tag/node.def b/templates/traceroute/ipv4/node.tag/node.def
deleted file mode 100644
index a37ae5b..0000000
--- a/templates/traceroute/ipv4/node.tag/node.def
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Operational mode template for the "traceroute" command
-#
-
-help: Track network path to specified <hostname|IPv4 address>
-allowed: echo -n '<hostname> <x:x:x:x>'
-
-run:
- if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv4 $3
- then
- /usr/bin/traceroute $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/traceroute $3
- else
- echo "Invalid IPv4 address or host name '$3'"
- fi
- else
- echo "Either enter a valid IPv4 address or configure Domain Name Server to resolve host names"
- fi
- fi
diff --git a/templates/traceroute/ipv6/node.def b/templates/traceroute/ipv6/node.def
deleted file mode 100644
index 1075c44..0000000
--- a/templates/traceroute/ipv6/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# 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
deleted file mode 100644
index b746c3e..0000000
--- a/templates/traceroute/ipv6/node.tag/node.def
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# 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
diff --git a/templates/traceroute/node.def b/templates/traceroute/node.def
deleted file mode 100644
index 28e695c..0000000
--- a/templates/traceroute/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# Operational mode template for the "traceroute" command
-#
-help: Track network path to node
diff --git a/templates/traceroute/node.tag/node.def b/templates/traceroute/node.tag/node.def
deleted file mode 100644
index 7b90221..0000000
--- a/templates/traceroute/node.tag/node.def
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# Operational mode template for the "traceroute" command
-#
-
-help: Track network path to specified node
-allowed: echo -n '<hostname> <x.x.x.x> <h:h:h:h:h:h:h:h>'
-
-run: /opt/vyatta/bin/vyatta-traceroute $2