summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark O'Brien <mobrien@firebolt.vyatta.com>2008-07-09 13:44:09 -0700
committerMark O'Brien <mobrien@firebolt.vyatta.com>2008-07-09 13:44:09 -0700
commit12389b69ceff66a1642d28f904c1685b7421f719 (patch)
treea746e4f16180eac5644ffedef5bb610161f8d285
parent90567d603a6c9867b6b9cb93f185a46b88f5aef9 (diff)
parent06acbf6c67ae127378c14b646de3f66efca57a1c (diff)
downloadvyatta-op-12389b69ceff66a1642d28f904c1685b7421f719.tar.gz
vyatta-op-12389b69ceff66a1642d28f904c1685b7421f719.zip
Merge branch 'hollywood' of git:/git/vyatta-op into hollywood
-rw-r--r--etc/bash_completion.d/10vyatta-op10
-rw-r--r--templates/show/files/node.tag/node.def2
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/node.def2
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/not/node.def1
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/not/port/node.def1
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/not/port/node.tag/node.def3
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/port/node.def1
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/port/node.tag/node.def3
-rw-r--r--templates/show/log/tail/node.tag/node.def2
-rw-r--r--templates/traceroute/node.tag/node.def22
10 files changed, 35 insertions, 12 deletions
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op
index fe3163c..4735462 100644
--- a/etc/bash_completion.d/10vyatta-op
+++ b/etc/bash_completion.d/10vyatta-op
@@ -434,11 +434,6 @@ fi
alias vtysh=$_vyatta_vtysh
-# don't initialize if we are in configure mode
-if [ "$_OFR_CONFIGURE" == "ok" ]; then
- return 0
-fi
-
nullglob_save=$( shopt -p nullglob )
shopt -s nullglob
for f in ${vyatta_datadir}/vyatta-op/functions/allowed/* ; do
@@ -447,6 +442,11 @@ done
eval $nullglob_save
unset nullglob_save
+# don't initialize if we are in configure mode
+if [ "$_OFR_CONFIGURE" == "ok" ]; then
+ return 0
+fi
+
_vyatta_op_init $@
### Local Variables:
diff --git a/templates/show/files/node.tag/node.def b/templates/show/files/node.tag/node.def
index 1734b2b..0448ad4 100644
--- a/templates/show/files/node.tag/node.def
+++ b/templates/show/files/node.tag/node.def
@@ -1,3 +1,3 @@
help: Show files in the specified directory
-allowed: echo -n *
+allowed: echo -n '<pathname>'
run: ls -lh "$3"
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/node.def b/templates/show/interfaces/tunnel/node.tag/capture/node.def
new file mode 100644
index 0000000..b196a35
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/node.def
@@ -0,0 +1,2 @@
+help: Show captured traffic on specified tunnel interface
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4"
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/not/node.def b/templates/show/interfaces/tunnel/node.tag/capture/not/node.def
new file mode 100644
index 0000000..c957f71
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/not/node.def
@@ -0,0 +1 @@
+help: Show captured traffic excluding the specified tunnel interface port
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.def b/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.def
new file mode 100644
index 0000000..c957f71
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.def
@@ -0,0 +1 @@
+help: Show captured traffic excluding the specified tunnel interface port
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.tag/node.def b/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.tag/node.def
new file mode 100644
index 0000000..b5c87c9
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Show captured traffic excluding the specified tunnel interface port
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4" "$8" 1
+allowed: echo -n '<1-65535>'
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/port/node.def b/templates/show/interfaces/tunnel/node.tag/capture/port/node.def
new file mode 100644
index 0000000..ed3b544
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/port/node.def
@@ -0,0 +1 @@
+help: Show captured traffic on specified tunnel interface port
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/port/node.tag/node.def b/templates/show/interfaces/tunnel/node.tag/capture/port/node.tag/node.def
new file mode 100644
index 0000000..d1f01df
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/port/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Show captured traffic on specified tunnel interface port
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4" "$7" 0
+allowed: echo -n '<1-65535>'
diff --git a/templates/show/log/tail/node.tag/node.def b/templates/show/log/tail/node.tag/node.def
index 00de686..b07bb9e 100644
--- a/templates/show/log/tail/node.tag/node.def
+++ b/templates/show/log/tail/node.tag/node.def
@@ -1,3 +1,3 @@
help: Show last changes to messages
allowed: echo -n '<NUMBER>'
-run: tail -n "$4" /var/log/messages
+run: tail -n "$4" /var/log/messages | ${VYATTA_PAGER:-cat}
diff --git a/templates/traceroute/node.tag/node.def b/templates/traceroute/node.tag/node.def
index 55acbb7..cf60ec4 100644
--- a/templates/traceroute/node.tag/node.def
+++ b/templates/traceroute/node.tag/node.def
@@ -6,9 +6,21 @@ help: Track network path to specified <hostname|IPv4 address>
allowed:
vyatta-allowed-hosts
-run: if /usr/bin/host $2 &>/dev/null
- then
- /usr/bin/traceroute $2
- else
- echo Cannot identify $2
+run:
+ if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv4 $2
+ then
+ /usr/bin/traceroute $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/traceroute $2
+ else
+ echo "Invalid IP address or host name '$2'"
+ fi
+ else
+ echo "Either enter a valid IPv4 address or configure Domain Name Server to resolve host names"
+ fi
fi