diff options
94 files changed, 241 insertions, 176 deletions
diff --git a/Makefile.am b/Makefile.am index 5d973f9..35d6691 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,12 +15,8 @@ bin_SCRIPTS = scripts/vyatta-show-interfaces bin_SCRIPTS += scripts/vyatta-show-interfaces.pl bin_SCRIPTS += scripts/vyatta-show-version bin_SCRIPTS += scripts/vyatta-show-dhclient.pl -bin_SCRIPTS += scripts/vyatta-show-log -bin_SCRIPTS += scripts/vyatta-show-log-all -bin_SCRIPTS += scripts/vyatta-show-log-file -bin_SCRIPTS += scripts/vyatta-show-dmesg -bin_SCRIPTS += scripts/vyatta-show-dmesg-all bin_SCRIPTS += scripts/vyatta-show-dmi +bin_SCRIPTS += scripts/vyatta-tshark-interface-port.pl bin_sudo_users_SCRIPTS = scripts/vyatta-identify-interface.pl bin_sudo_users_SCRIPTS += scripts/vyatta-delete-log-file.sh diff --git a/configure.ac b/configure.ac index 015d730..bb44cfc 100644 --- a/configure.ac +++ b/configure.ac @@ -15,24 +15,10 @@ AC_CONFIG_AUX_DIR([config]) AM_INIT_AUTOMAKE([gnu no-dist-gzip dist-bzip2 subdir-objects]) AC_PREFIX_DEFAULT([/opt/vyatta]) -AC_PROG_CC -AM_PROG_AS -AM_PROG_CC_C_O -AC_PROG_LIBTOOL -AC_PROG_LEX -AC_PROG_YACC - -AC_ARG_ENABLE([nostrip], - AC_HELP_STRING([--enable-nostrip], - [include -nostrip option during packaging]), - [NOSTRIP=-nostrip], [NOSTRIP=]) - AC_CONFIG_FILES( [Makefile] [etc/default/vyatta] [debian/vyatta-op.postinst]) -AC_SUBST(NOSTRIP) - AC_OUTPUT diff --git a/debian/control b/debian/control index c124dfa..757332b 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,7 @@ Package: vyatta-op Architecture: all Depends: sed (>= 4.1.5), ethtool, + traceroute, ntpdate, procps (>= 1:3.2.7-3), pciutils, diff --git a/debian/rules b/debian/rules index f2e5c13..4db6686 100755 --- a/debian/rules +++ b/debian/rules @@ -9,30 +9,13 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) PACKAGE=vyatta-op PKGDIR=$(CURDIR)/debian/$(PACKAGE) -CFLAGS = -Wall -g - configure = ./configure -configure += --host=$(DEB_HOST_GNU_TYPE) -configure += --build=$(DEB_BUILD_GNU_TYPE) configure += --prefix=/opt/vyatta configure += --mandir=\$${prefix}/share/man configure += --infodir=\$${prefix}/share/info -configure += CFLAGS="$(CFLAGS)" -configure += LDFLAGS="-Wl,-z,defs" - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif configure: configure.ac Makefile.am chmod +x debian/autogen.sh @@ -84,8 +67,6 @@ binary-indep: build install dh_installdocs dh_install dh_installdebconf - dh_link - dh_strip dh_compress dh_fixperms dh_installdeb diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op index ebff99f..fe3163c 100644 --- a/etc/bash_completion.d/10vyatta-op +++ b/etc/bash_completion.d/10vyatta-op @@ -19,17 +19,19 @@ # # **** End License **** -test -z "$_vyatta_default_pager" && \ - declare -r _vyatta_default_pager="less\ +test -z "$_vyatta_less_options" && \ + declare -r _vyatta_less_options="\ --QUIT-AT-EOF\ --quit-if-one-screen\ - --LONG-PROMPT\ --RAW-CONTROL-CHARS\ --squeeze-blank-lines\ + --no-init" +test -z "$_vyatta_default_pager" && \ + declare -r _vyatta_default_pager="less \ --buffers=64\ --auto-buffers\ - --no-init\ - --no-lessopen" + --no-lessopen\ + $_vyatta_less_options" declare -x VYATTA_PAGER=$_vyatta_default_pager _vyatta_op_do_key_bindings () @@ -318,7 +320,8 @@ _vyatta_op_run () local run_cmd=$(_vyatta_op_get_node_def_field $tpath/node.def run) local ret=0 if [ -n "$run_cmd" ]; then - if [[ -t 1 && "$1" == "show" ]] ; then + if [[ -t 1 && "$1" == "show" && \ + ! $run_cmd =~ ^\(LESSOPEN=\|less\|pager\|tail\|/opt/vyatta/bin/vyatta-tshark-interface-port.pl\).* ]] ; then eval "($run_cmd) | ${VYATTA_PAGER:-cat}" else eval "$run_cmd" @@ -421,16 +424,15 @@ _vyatta_pipe_completion () return 0 } -vtysh () -{ - if [ -S /var/run/vyatta/quagga/zebra.vty ] ; then - vyatta-vtysh "$@" - elif [ ! -S /var/run/quagga/zebra.vty ] ; then - /usr/bin/vtysh "$@" - else - echo "Can't connect with zebra daemon" - fi -} +if [ -S /var/run/vyatta/quagga/zebra.vty ] ; then + declare -x -r _vyatta_vtysh=vyatta-vtysh +elif [ ! -S /var/run/quagga/zebra.vty ] ; then + declare -x -r _vyatta_vtysh=/usr/bin/vtysh +else + declare -x -r _vyatta_vtysh="echo \"Can't connect with zebra daemon to run: vtysh \"" +fi + +alias vtysh=$_vyatta_vtysh # don't initialize if we are in configure mode if [ "$_OFR_CONFIGURE" == "ok" ]; then diff --git a/functions/allowed/hosts b/functions/allowed/hosts index d608361..912a9ea 100755 --- a/functions/allowed/hosts +++ b/functions/allowed/hosts @@ -3,7 +3,7 @@ # or expanded hosts/address # declare -a _vyatta_hosts -declare -a _vyatta_symbolic_hosts=( '<HOSTNAME>' '<A.B.C.D>' '<X:X::X:X>' ) +declare -a _vyatta_symbolic_hosts=( '<hostname>' '<x.x.x.x>' ) declare -i _vyatta_hostfile_lastmod=0 declare _vyatta_hostfile_sed='s/#.*//; ; s/^[^ \t]\+[ \t]\+//; s/[ \t]\+/\n/g; /^$/d' @@ -16,7 +16,7 @@ function vyatta-allowed-hosts () _vyatta_hosts=( $(sed "$_vyatta_hostfile_sed" $HOSTFILE) ) _vyatta_hostfile_lastmod=$curmod fi - printf "%s\n" ${_vyatta_symbolic_hosts[@]} ${_vyatta_hosts[@]} $* + printf "%s\n" ${_vyatta_symbolic_hosts[@]} # ${_vyatta_hosts[@]} $* # commenting this untill ipv6 is supported } ### Local Variables: diff --git a/scripts/vyatta-show-dmesg b/scripts/vyatta-show-dmesg deleted file mode 100755 index 8a53a94..0000000 --- a/scripts/vyatta-show-dmesg +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cat /var/log/dmes? /dev/null - diff --git a/scripts/vyatta-show-dmesg-all b/scripts/vyatta-show-dmesg-all deleted file mode 100755 index d511ea0..0000000 --- a/scripts/vyatta-show-dmesg-all +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -shopt -s extglob nullglob - -declare -a zipped_files=($( printf "%s\n" /var/log/dmesg*.gz | sort -r )) -declare -a plain_files=($( printf "%s\n" /var/log/dmesg!(*.gz) | sort -r )) - -[ ${#zipped_files[@]} -gt 0 ] && gunzip --stdout ${zipped_files[@]} -[ ${#plain_files[@]} -gt 0 ] && cat ${plain_files[@]} diff --git a/scripts/vyatta-show-interfaces b/scripts/vyatta-show-interfaces index 7add3cc..dafed83 100755 --- a/scripts/vyatta-show-interfaces +++ b/scripts/vyatta-show-interfaces @@ -22,7 +22,7 @@ shopt -s extglob shopt -s nullglob declare progname=${0##*/} -declare -a full_itfs=( /sys/class/net/+(eth|vmnet|lo|tun|wan|pppoe)* ) +declare -a full_itfs=( /sys/class/net/+(eth|vmnet|lo|tun|wan|pppoe|adsl)* ) declare -a itfs declare _do_show=_show_itf_stats @@ -120,6 +120,8 @@ _usage () $progname loopback [ INTERFACE ] $progname tunnel [ INTERFACE ] $progname serial [ INTERFACE ] + $progname pppoe [ INTERFACE ] + $progname adsl [ INTERFACE ] $progname system [ enabled ] EOF } @@ -127,7 +129,7 @@ _usage () _add_itfs () { for itf ; do - if [[ $itf != +(eth|vmnet|lo|tun|wan|pppoe)* ]] ; then + if [[ $itf != +(eth|vmnet|lo|tun|wan|pppoe|adsl)* ]] ; then _error 2 \""$itf"\" is not an interface name\! elif [ ! -d /sys/class/net/$itf ] ; then _error 2 $itf: no such interface\! @@ -141,7 +143,7 @@ if [ $# -gt 0 ] ; then if [[ $1 == --+(usage|help) ]] ; then _usage exit 0 - elif [[ $1 == +(ethernet|loopback|system|tunnel|serial|pppoe) ]] ; then + elif [[ $1 == +(ethernet|loopback|system|tunnel|serial|pppoe|adsl) ]] ; then if [ $# -eq 1 ] ; then case $1 in ethernet ) @@ -154,6 +156,8 @@ if [ $# -gt 0 ] ; then full_itfs=( /sys/class/net/wan* ) ;; pppoe ) full_itfs=( /sys/class/net/pppoe* ) ;; + adsl ) + full_itfs=( /sys/class/net/adsl* ) ;; esac itfs=( ${full_itfs[@]##*/} ) else diff --git a/scripts/vyatta-show-interfaces.pl b/scripts/vyatta-show-interfaces.pl index 092f147..93760c6 100644 --- a/scripts/vyatta-show-interfaces.pl +++ b/scripts/vyatta-show-interfaces.pl @@ -42,6 +42,7 @@ my %intf_hash = ( bridge => 'br', loopback => 'lo', pppoe => 'pppoe', + adsl => 'adsl', multilink => 'ml', ); @@ -335,6 +336,39 @@ sub run_reset_intf { } } +sub alphanum_split { + my ($str) = @_; + my @list = split m/(?=(?<=\D)\d|(?<=\d)\D)/, $str; + return @list; +} + +sub natural_order { + my ($a, $b) = @_; + my @a = alphanum_split($a); + my @b = alphanum_split($b); + + while (@a && @b) { + my $a_seg = shift @a; + my $b_seg = shift @b; + my $val; + if (($a_seg =~ /\d/) && ($b_seg =~ /\d/)) { + $val = $a_seg <=> $b_seg; + } else { + $val = $a_seg cmp $b_seg; + } + if ($val != 0) { + return $val; + } + } + return @a <=> @b; +} + +sub intf_sort { + my @a = @_; + my @new_a = sort { natural_order($a,$b) } @a; + return @new_a; +} + # # main @@ -369,6 +403,8 @@ if (! defined $action) { $action = 'show'; } +@intf_list = intf_sort(@intf_list); + my $func; if (defined $action_hash{$action}) { $func = $action_hash{$action}; diff --git a/scripts/vyatta-show-log b/scripts/vyatta-show-log deleted file mode 100755 index 10e46e5..0000000 --- a/scripts/vyatta-show-log +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cat /var/log/messages - diff --git a/scripts/vyatta-show-log-all b/scripts/vyatta-show-log-all deleted file mode 100755 index 126b7fc..0000000 --- a/scripts/vyatta-show-log-all +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -shopt -s extglob nullglob - -declare -a zipped_files=($( printf "%s\n" /var/log/messages*.gz | sort -r )) -declare -a plain_files=($( printf "%s\n" /var/log/messages!(*.gz) | sort -r )) - -[ ${#zipped_files[@]} -gt 0 ] && gunzip --stdout ${zipped_files[@]} -[ ${#plain_files[@]} -gt 0 ] && cat ${plain_files[@]} diff --git a/scripts/vyatta-show-log-file b/scripts/vyatta-show-log-file deleted file mode 100755 index caf8ac9..0000000 --- a/scripts/vyatta-show-log-file +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [[ "$1" == */* ]]; then - echo "Invalid log file name" - exit 1 -fi - -if [ -f "/var/log/user/$1" ]; then - cat /var/log/user/$1 -else - echo "No such log file" -fi - diff --git a/scripts/vyatta-tshark-interface-port.pl b/scripts/vyatta-tshark-interface-port.pl new file mode 100644 index 0000000..4eff322 --- /dev/null +++ b/scripts/vyatta-tshark-interface-port.pl @@ -0,0 +1,62 @@ +#!/usr/bin/perl +# +# Module: vyatta-tshark-interface-port.pl +# +# **** License **** +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# This code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2006, 2007, 2008 Vyatta, Inc. +# All Rights Reserved. +# +# Author: Mohit Mehta +# Date: April 2008 +# Description: tshark on a given port for a given interface from vyatta cli +# +# **** End License **** +# + +use lib "/opt/vyatta/share/perl5/"; + +use strict; +use warnings; + +# +# main +# + +my $intf = $ARGV[0]; + +if ($#ARGV > 0){ + my $port = $ARGV[1]; + my $not_port = $ARGV[2]; + if ($port =~ /[a-zA-Z]/){ + print "Port number has to be numeric. Allowed values: <1-65535>\n"; + exit 1; + } else { + if (($port > 0) and ($port < 65536)){ + if ($not_port == 0){ + exec "sudo /usr/bin/tshark -n -i $intf port $port"; + } else { + exec "sudo /usr/bin/tshark -n -i $intf not port $port"; + } + } else { + print "Invalid port number. Allowed values: <1-65535>\n"; + exit 1; + } + + } +} else { + exec "sudo /usr/bin/tshark -n -i $intf"; +} + +exit 0; + +#end of file diff --git a/templates/clear/arp/address/node.def b/templates/clear/arp/address/node.def index 149cf76..efe6f10 100644 --- a/templates/clear/arp/address/node.def +++ b/templates/clear/arp/address/node.def @@ -1 +1 @@ -help: Clear ARP cache for address +help: Clear ARP cache for an IPv4 address diff --git a/templates/clear/arp/address/node.tag/node.def b/templates/clear/arp/address/node.tag/node.def index 23fc5bc..2c523ef 100644 --- a/templates/clear/arp/address/node.tag/node.def +++ b/templates/clear/arp/address/node.tag/node.def @@ -1,3 +1,3 @@ -help: Clear ARP cache for address -allowed: echo -n '<ip_address>' +help: Clear ARP cache for an IPv4 address +allowed: echo -n '<x.x.x.x>' run: sudo /sbin/ip neigh flush to "$4" diff --git a/templates/clear/arp/node.def b/templates/clear/arp/node.def index 08b3f7a..394a9f0 100644 --- a/templates/clear/arp/node.def +++ b/templates/clear/arp/node.def @@ -1 +1 @@ -help: Clear Address Resolution Protocol cache +help: Clear Address Resolution Protocol (ARP) cache diff --git a/templates/clear/dhcp/client/node.def b/templates/clear/dhcp/client/node.def index d8066da..1c658f0 100644 --- a/templates/clear/dhcp/client/node.def +++ b/templates/clear/dhcp/client/node.def @@ -1 +1 @@ -help: Clear dhcp client information +help: Clear DHCP client information diff --git a/templates/clear/dhcp/client/process/node.def b/templates/clear/dhcp/client/process/node.def index 50e52ff..c83dace 100644 --- a/templates/clear/dhcp/client/process/node.def +++ b/templates/clear/dhcp/client/process/node.def @@ -1,2 +1,2 @@ -help: Restart the dhcp client process +help: Restart the DHCP client process run: sudo ${vyatta_bindir}/sudo-users/vyatta-interfaces.pl --restart-dhclient diff --git a/templates/clear/interfaces/bridge/node.tag/counters/node.def b/templates/clear/interfaces/bridge/node.tag/counters/node.def index ba3199b..8b2c6b3 100644 --- a/templates/clear/interfaces/bridge/node.tag/counters/node.def +++ b/templates/clear/interfaces/bridge/node.tag/counters/node.def @@ -1,2 +1,2 @@ -help: Clear interface counters for a given interface +help: Clear interface counters for a given bridge interface run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf="$4" diff --git a/templates/clear/interfaces/bridge/node.tag/node.def b/templates/clear/interfaces/bridge/node.tag/node.def index 4b6256e..e73a82d 100644 --- a/templates/clear/interfaces/bridge/node.tag/node.def +++ b/templates/clear/interfaces/bridge/node.tag/node.def @@ -1,4 +1,4 @@ -help: Clear interface information for a given interface +help: Clear interface information for a given bridge interface allowed: local -a array ; array=( /sys/class/net/br* ) ; echo -n ${array[@]##*/} diff --git a/templates/clear/interfaces/ethernet/counters/node.def b/templates/clear/interfaces/ethernet/counters/node.def index 85a02d5..d722d69 100644 --- a/templates/clear/interfaces/ethernet/counters/node.def +++ b/templates/clear/interfaces/ethernet/counters/node.def @@ -1,2 +1,2 @@ -help: Clear all Ethernet interface counters +help: Clear all ethernet interface counters run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf-type="$3" diff --git a/templates/clear/interfaces/ethernet/node.def b/templates/clear/interfaces/ethernet/node.def index 3e6f0dc..eda1665 100644 --- a/templates/clear/interfaces/ethernet/node.def +++ b/templates/clear/interfaces/ethernet/node.def @@ -1 +1 @@ -help: Clear Ethernet interface information +help: Clear ethernet interface information diff --git a/templates/clear/interfaces/ethernet/node.tag/counters/node.def b/templates/clear/interfaces/ethernet/node.tag/counters/node.def index ba3199b..467a084 100644 --- a/templates/clear/interfaces/ethernet/node.tag/counters/node.def +++ b/templates/clear/interfaces/ethernet/node.tag/counters/node.def @@ -1,2 +1,2 @@ -help: Clear interface counters for a given interface +help: Clear interface counters for a given ethernet interface run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf="$4" diff --git a/templates/clear/interfaces/ethernet/node.tag/node.def b/templates/clear/interfaces/ethernet/node.tag/node.def index 4f39ebf..17e07e1 100644 --- a/templates/clear/interfaces/ethernet/node.tag/node.def +++ b/templates/clear/interfaces/ethernet/node.tag/node.def @@ -1,4 +1,4 @@ -help: Clear interface information for a given interface +help: Clear interface information for a given ethernet interface allowed: local -a array ; array=( /sys/class/net/eth* ) ; echo -n ${array[@]##*/} diff --git a/templates/clear/interfaces/loopback/node.tag/counters/node.def b/templates/clear/interfaces/loopback/node.tag/counters/node.def index ba3199b..34c895c 100644 --- a/templates/clear/interfaces/loopback/node.tag/counters/node.def +++ b/templates/clear/interfaces/loopback/node.tag/counters/node.def @@ -1,2 +1,2 @@ -help: Clear interface counters for a given interface +help: Clear interface counters for a given loopback interface run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf="$4" diff --git a/templates/clear/interfaces/loopback/node.tag/node.def b/templates/clear/interfaces/loopback/node.tag/node.def index cfefa98..6059e8c 100644 --- a/templates/clear/interfaces/loopback/node.tag/node.def +++ b/templates/clear/interfaces/loopback/node.tag/node.def @@ -1,4 +1,4 @@ -help: Clear interface counters for a given interface +help: Clear interface counters for a given loopback interface allowed: local -a array ; array=( /sys/class/net/lo* ) ; echo -n ${array[@]##*/} diff --git a/templates/clear/interfaces/tunnel/node.tag/counters/node.def b/templates/clear/interfaces/tunnel/node.tag/counters/node.def index ba3199b..3b00df5 100644 --- a/templates/clear/interfaces/tunnel/node.tag/counters/node.def +++ b/templates/clear/interfaces/tunnel/node.tag/counters/node.def @@ -1,2 +1,2 @@ -help: Clear interface counters for a given interface +help: Clear interface counters for a given tunnel interface run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf="$4" diff --git a/templates/clear/interfaces/tunnel/node.tag/node.def b/templates/clear/interfaces/tunnel/node.tag/node.def index cf85a2c..3452c92 100644 --- a/templates/clear/interfaces/tunnel/node.tag/node.def +++ b/templates/clear/interfaces/tunnel/node.tag/node.def @@ -1,4 +1,4 @@ -help: Clear interface information for a given interface +help: Clear interface information for a given tunnel interface allowed: local -a array ; array=( /sys/class/net/tun* ) ; echo -n ${array[@]##*/} diff --git a/templates/clear/ip/route/cache/node.tag/node.def b/templates/clear/ip/route/cache/node.tag/node.def index 97f7fc3..4af1915 100644 --- a/templates/clear/ip/route/cache/node.tag/node.def +++ b/templates/clear/ip/route/cache/node.tag/node.def @@ -1,3 +1,3 @@ help: Flush the kernel route cache for a given route -allowed: echo -n '<network>' +allowed: echo -n '<x.x.x.x | x.x.x.x/x>' run: sudo /sbin/ip route flush cache "$5" diff --git a/templates/clear/node.def b/templates/clear/node.def index aa60d4f..18cca25 100644 --- a/templates/clear/node.def +++ b/templates/clear/node.def @@ -1 +1 @@ -help: Clear PROTOCOL statistics or status +help: Clear system information diff --git a/templates/delete/log/file/node.tag/node.def b/templates/delete/log/file/node.tag/node.def index 3b9406e..95e46b6 100644 --- a/templates/delete/log/file/node.tag/node.def +++ b/templates/delete/log/file/node.tag/node.def @@ -1,2 +1,2 @@ -help: Delete a specified log file +help: Delete the specified log file run: sudo ${vyatta_bindir}/sudo-users/vyatta-delete-log-file.sh "$4" diff --git a/templates/ping/node.def b/templates/ping/node.def index 71361ca..2639ddb 100644 --- a/templates/ping/node.def +++ b/templates/ping/node.def @@ -1,4 +1,4 @@ # # Operational mode template for the "ping" command # -help: Send ICMP echo request +help: Send Internet Control Message Protocol (ICMP) echo request diff --git a/templates/ping/node.tag/node.def b/templates/ping/node.tag/node.def index 5f6550e..9f58702 100644 --- a/templates/ping/node.tag/node.def +++ b/templates/ping/node.tag/node.def @@ -2,6 +2,7 @@ # Operational mode front-end for "ping" command # +help: Send ICMP echo request to specified <hostname|IPv4 address> allowed: vyatta-allowed-hosts diff --git a/templates/reboot/node.def b/templates/reboot/node.def index e1d30d2..57b4c9e 100644 --- a/templates/reboot/node.def +++ b/templates/reboot/node.def @@ -1,2 +1,2 @@ -help: "Reboot the system" +help: Reboot the system run: sudo /sbin/reboot diff --git a/templates/set/date/ntp/node.def b/templates/set/date/ntp/node.def index 101f642..0b8705c 100644 --- a/templates/set/date/ntp/node.def +++ b/templates/set/date/ntp/node.def @@ -1 +1 @@ -help: Set system date and time from NTP server +help: Set system date and time from Network Time Protocol (NTP) server diff --git a/templates/show/arp/node.def b/templates/show/arp/node.def index 021f848..10e5d5d 100644 --- a/templates/show/arp/node.def +++ b/templates/show/arp/node.def @@ -1,2 +1,2 @@ -help: Show Address Resolution Protocol Information +help: Show Address Resolution Protocol (ARP) information run: /usr/sbin/arp -e diff --git a/templates/show/bridge/node.def b/templates/show/bridge/node.def index 53327bd..a1ed782 100644 --- a/templates/show/bridge/node.def +++ b/templates/show/bridge/node.def @@ -1,2 +1,2 @@ -help: "Show bridging information" +help: Show bridging information run: /usr/sbin/brctl show diff --git a/templates/show/bridge/node.tag/macs/node.def b/templates/show/bridge/node.tag/macs/node.def index 160b236..d07958c 100644 --- a/templates/show/bridge/node.tag/macs/node.def +++ b/templates/show/bridge/node.tag/macs/node.def @@ -1,2 +1,2 @@ -help: Show bridge MAC table +help: Show bridge Media Access Control (MAC) address table run: /usr/sbin/brctl showmacs "$3" diff --git a/templates/show/bridge/node.tag/node.def b/templates/show/bridge/node.tag/node.def index dd59fca..db7fcca 100644 --- a/templates/show/bridge/node.tag/node.def +++ b/templates/show/bridge/node.tag/node.def @@ -1,4 +1,4 @@ -help: Show bridge information for a given bridge +help: Show bridge information for a given bridge interface allowed: local -a array ; array=( /sys/class/net/br* ) ; echo -n ${array[@]##*/} diff --git a/templates/show/dhcp/client/leases/interface/node.def b/templates/show/dhcp/client/leases/interface/node.def index 458e0ec..ab13930 100644 --- a/templates/show/dhcp/client/leases/interface/node.def +++ b/templates/show/dhcp/client/leases/interface/node.def @@ -1 +1 @@ -help: Show dhcp client information for a given interface +help: Show DHCP client information for a given interface diff --git a/templates/show/dhcp/client/leases/interface/node.tag/node.def b/templates/show/dhcp/client/leases/interface/node.tag/node.def index 5e8f7f3..b0120d0 100644 --- a/templates/show/dhcp/client/leases/interface/node.tag/node.def +++ b/templates/show/dhcp/client/leases/interface/node.tag/node.def @@ -1,4 +1,4 @@ -help: Show dhcp client information for interface +help: Show DHCP client information for interface allowed: local -a array ; array=( /sys/class/net/eth* ) ; echo -n ${array[@]##*/} diff --git a/templates/show/dhcp/client/leases/node.def b/templates/show/dhcp/client/leases/node.def index 16bef4d..abded1e 100644 --- a/templates/show/dhcp/client/leases/node.def +++ b/templates/show/dhcp/client/leases/node.def @@ -1,2 +1,2 @@ -help: Show dhcp client leases +help: Show DHCP client leases run: /opt/vyatta/bin/vyatta-show-dhclient.pl diff --git a/templates/show/dhcp/client/node.def b/templates/show/dhcp/client/node.def index 874c579..094eaf4 100644 --- a/templates/show/dhcp/client/node.def +++ b/templates/show/dhcp/client/node.def @@ -1 +1 @@ -help: Show dhcp client information +help: Show DHCP client information diff --git a/templates/show/files/node.tag/node.def b/templates/show/files/node.tag/node.def index 2aea5ab..17dcae9 100644 --- a/templates/show/files/node.tag/node.def +++ b/templates/show/files/node.tag/node.def @@ -1,2 +1,2 @@ -help: Show files in directory +help: Show files in the specified directory run: ls -lh $3 diff --git a/templates/show/hardware/cpu/node.def b/templates/show/hardware/cpu/node.def index 4339af2..2e3c616 100644 --- a/templates/show/hardware/cpu/node.def +++ b/templates/show/hardware/cpu/node.def @@ -1,2 +1,4 @@ help: Show system CPU details -run: cat /proc/cpuinfo +run: less $_vyatta_less_options \ + --prompt=".cpu info" \ + -- /proc/cpuinfo diff --git a/templates/show/hardware/mem/node.def b/templates/show/hardware/mem/node.def index 7a54e52..acf1109 100644 --- a/templates/show/hardware/mem/node.def +++ b/templates/show/hardware/mem/node.def @@ -1,2 +1,4 @@ help: Show system RAM details -run: cat /proc/meminfo +run: less $_vyatta_less_options \ + --prompt=".mem info" \ + -- /proc/meminfo diff --git a/templates/show/host/lookup/node.def b/templates/show/host/lookup/node.def index d8368b6..375d356 100644 --- a/templates/show/host/lookup/node.def +++ b/templates/show/host/lookup/node.def @@ -1 +1 @@ -help: Lookup host info for host/ipaddress +help: Lookup host information for <hostname|IPv4 address> diff --git a/templates/show/host/lookup/node.tag/node.def b/templates/show/host/lookup/node.tag/node.def index e0dd0df..29bf5a7 100644 --- a/templates/show/host/lookup/node.tag/node.def +++ b/templates/show/host/lookup/node.tag/node.def @@ -1,3 +1,3 @@ -help: Lookup host information for host/ipaddres +help: Lookup host information for specified <hostname|IPv4 address> allowed: vyatta-allowed-hosts run: /usr/bin/host $4 diff --git a/templates/show/interfaces/bridge/node.tag/brief/node.def b/templates/show/interfaces/bridge/node.tag/brief/node.def index d3d213d..ca07860 100644 --- a/templates/show/interfaces/bridge/node.tag/brief/node.def +++ b/templates/show/interfaces/bridge/node.tag/brief/node.def @@ -1,2 +1,2 @@ -help: Show summary of a given bridge interface information +help: Show summary of the specified bridge interface information run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4" --action=show-brief diff --git a/templates/show/interfaces/bridge/node.tag/node.def b/templates/show/interfaces/bridge/node.tag/node.def index 41aa6b2..d2c5eec 100644 --- a/templates/show/interfaces/bridge/node.tag/node.def +++ b/templates/show/interfaces/bridge/node.tag/node.def @@ -1,4 +1,4 @@ -help: Show given bridge interface information +help: Show specified bridge interface information allowed: local -a array ; array=( /sys/class/net/br* ) ; echo -n ${array[@]##*/} diff --git a/templates/show/interfaces/detail/node.def b/templates/show/interfaces/detail/node.def index f875ce8..08bdfa4 100644 --- a/templates/show/interfaces/detail/node.def +++ b/templates/show/interfaces/detail/node.def @@ -1,2 +1,2 @@ -help: Show detail information of all interfaces +help: Show detailed information of all interfaces run: ${vyatta_bindir}/vyatta-show-interfaces.pl --action=show diff --git a/templates/show/interfaces/ethernet/detail/node.def b/templates/show/interfaces/ethernet/detail/node.def index 9883539..40ecdf1 100644 --- a/templates/show/interfaces/ethernet/detail/node.def +++ b/templates/show/interfaces/ethernet/detail/node.def @@ -1,2 +1,2 @@ -help: Show ethernet interface information +help: Show detailed ethernet interface information run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf-type=ethernet --action=show diff --git a/templates/show/interfaces/ethernet/node.tag/brief/node.def b/templates/show/interfaces/ethernet/node.tag/brief/node.def index 3340d9e..0d164bc 100644 --- a/templates/show/interfaces/ethernet/node.tag/brief/node.def +++ b/templates/show/interfaces/ethernet/node.tag/brief/node.def @@ -1,2 +1,2 @@ -help: Show given ethernet interface information +help: Show summary of the specified ethernet interface information run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4" --action=show-brief diff --git a/templates/show/interfaces/ethernet/node.tag/capture/node.def b/templates/show/interfaces/ethernet/node.tag/capture/node.def new file mode 100644 index 0000000..318f6cf --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/capture/node.def @@ -0,0 +1,2 @@ +help: Show captured traffic on specified ethernet interface +run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4" diff --git a/templates/show/interfaces/ethernet/node.tag/capture/not/node.def b/templates/show/interfaces/ethernet/node.tag/capture/not/node.def new file mode 100644 index 0000000..ca8a2ed --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/capture/not/node.def @@ -0,0 +1 @@ +help: Show captured traffic excluding the specified ethernet interface port diff --git a/templates/show/interfaces/ethernet/node.tag/capture/not/port/node.def b/templates/show/interfaces/ethernet/node.tag/capture/not/port/node.def new file mode 100644 index 0000000..ca8a2ed --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/capture/not/port/node.def @@ -0,0 +1 @@ +help: Show captured traffic excluding the specified ethernet interface port diff --git a/templates/show/interfaces/ethernet/node.tag/capture/not/port/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/capture/not/port/node.tag/node.def new file mode 100644 index 0000000..a350ac5 --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/capture/not/port/node.tag/node.def @@ -0,0 +1,3 @@ +help: Show captured traffic excluding the specified ethernet 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/ethernet/node.tag/capture/port/node.def b/templates/show/interfaces/ethernet/node.tag/capture/port/node.def new file mode 100644 index 0000000..7f6d889 --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/capture/port/node.def @@ -0,0 +1 @@ +help: Show captured traffic on specified ethernet interface port diff --git a/templates/show/interfaces/ethernet/node.tag/capture/port/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/capture/port/node.tag/node.def new file mode 100644 index 0000000..f1aedc4 --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/capture/port/node.tag/node.def @@ -0,0 +1,3 @@ +help: Show captured traffic on specified ethernet interface port +run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4" "$7" 0 +allowed: echo -n '<1-65535>' diff --git a/templates/show/interfaces/ethernet/node.tag/identify/node.def b/templates/show/interfaces/ethernet/node.tag/identify/node.def index d94172f..d308621 100644 --- a/templates/show/interfaces/ethernet/node.tag/identify/node.def +++ b/templates/show/interfaces/ethernet/node.tag/identify/node.def @@ -1,2 +1,2 @@ -help: Visually identify the specified Ethernet interface +help: Visually identify the specified ethernet interface run: sudo ${vyatta_bindir}/sudo-users/vyatta-identify-interface.pl "$4" diff --git a/templates/show/interfaces/ethernet/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/node.def index b41cf8b..57a5623 100644 --- a/templates/show/interfaces/ethernet/node.tag/node.def +++ b/templates/show/interfaces/ethernet/node.tag/node.def @@ -1,4 +1,4 @@ -help: Show given ethernet interface information +help: Show specified ethernet interface information allowed: for dev in /sys/class/net/*; do if [[ -L $dev/device ]] then if [[ $(cat $dev/type) -eq 1 ]] diff --git a/templates/show/interfaces/ethernet/node.tag/physical/node.def b/templates/show/interfaces/ethernet/node.tag/physical/node.def index 3667c13..7723946 100644 --- a/templates/show/interfaces/ethernet/node.tag/physical/node.def +++ b/templates/show/interfaces/ethernet/node.tag/physical/node.def @@ -1,3 +1,3 @@ -help: Show physical device information of given ethernet interface +help: Show physical device information for specified ethernet interface allowed: "" run: /usr/sbin/ethtool "$4"; /usr/sbin/ethtool -i "$4" diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.def index b3d92de..2b74427 100644 --- a/templates/show/interfaces/ethernet/node.tag/vif/node.def +++ b/templates/show/interfaces/ethernet/node.tag/vif/node.def @@ -1,4 +1,4 @@ -help: Show given virtual network interface information +help: Show specified virtual network interface (vif) information run: tput setaf ${COLOR_RED:-1} ; echo error: need to supply vif # ; tput op diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/brief/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/brief/node.def index 1eaa07c..7aa871e 100644 --- a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/brief/node.def +++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/brief/node.def @@ -1,2 +1,2 @@ -help: Show given virtual network interface information +help: Show summary of specified virtual network interface (vif) information run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4.$6" --action=show-brief diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def index 13f196f..52bfbee 100644 --- a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def +++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def @@ -1,4 +1,4 @@ -help: Show given virtual network interface information +help: Show specified virtual network interface (vif) information allowed: local -a array ; array=( /sys/class/net/${COMP_WORDS[3]}.* ) ; echo -n ${array[@]##*.} diff --git a/templates/show/interfaces/loopback/detail/node.def b/templates/show/interfaces/loopback/detail/node.def index 759407a..629a979 100644 --- a/templates/show/interfaces/loopback/detail/node.def +++ b/templates/show/interfaces/loopback/detail/node.def @@ -1,2 +1,2 @@ -help: Show loopback interface information +help: Show detailed loopback interface information run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf-type=loopback diff --git a/templates/show/interfaces/loopback/node.tag/brief/node.def b/templates/show/interfaces/loopback/node.tag/brief/node.def index 85970d3..2ea8f06 100644 --- a/templates/show/interfaces/loopback/node.tag/brief/node.def +++ b/templates/show/interfaces/loopback/node.tag/brief/node.def @@ -1,2 +1,2 @@ -help: Show summary of given loopback interface information +help: Show summary of specified loopback interface information run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4" --action=show-brief diff --git a/templates/show/interfaces/loopback/node.tag/node.def b/templates/show/interfaces/loopback/node.tag/node.def index 84f3624..3364827 100644 --- a/templates/show/interfaces/loopback/node.tag/node.def +++ b/templates/show/interfaces/loopback/node.tag/node.def @@ -1,4 +1,4 @@ -help: Show given loopback interface information +help: Show specified loopback interface information allowed: local -a array ; array=( /sys/class/net/lo* ) ; echo -n ${array[@]##*/} diff --git a/templates/show/interfaces/tunnel/detail/node.def b/templates/show/interfaces/tunnel/detail/node.def index d3c8d95..ea23c81 100644 --- a/templates/show/interfaces/tunnel/detail/node.def +++ b/templates/show/interfaces/tunnel/detail/node.def @@ -1,2 +1,2 @@ -help: Show tunnel interface information -run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf-type=tunnel --action=show
\ No newline at end of file +help: Show detailed tunnel interface information +run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf-type=tunnel --action=show diff --git a/templates/show/interfaces/tunnel/node.tag/brief/node.def b/templates/show/interfaces/tunnel/node.tag/brief/node.def index 81e2c24..4c63d8e 100644 --- a/templates/show/interfaces/tunnel/node.tag/brief/node.def +++ b/templates/show/interfaces/tunnel/node.tag/brief/node.def @@ -1,2 +1,2 @@ -help: Show given tunnel interface information +help: Show summary of specified tunnel interface information run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4" --action=show-brief diff --git a/templates/show/interfaces/tunnel/node.tag/node.def b/templates/show/interfaces/tunnel/node.tag/node.def index c39ad7e..6818464 100644 --- a/templates/show/interfaces/tunnel/node.tag/node.def +++ b/templates/show/interfaces/tunnel/node.tag/node.def @@ -1,4 +1,4 @@ -help: Show given tunnel interface information +help: Show specified tunnel interface information allowed: local -a array ; array=( /sys/class/net/tun* ) ; echo -n ${array[@]##*/} diff --git a/templates/show/ip/route/cache/node.tag/node.def b/templates/show/ip/route/cache/node.tag/node.def index 85fe4e6..2cb78d5 100644 --- a/templates/show/ip/route/cache/node.tag/node.def +++ b/templates/show/ip/route/cache/node.tag/node.def @@ -1,3 +1,3 @@ help: Show kernel route cache for a given route -allowed: echo -n '<network>' +allowed: echo -n '<x.x.x.x | x.x.x.x/x>' run: ip -s route list cache $5 diff --git a/templates/show/ip/route/forward/node.tag/node.def b/templates/show/ip/route/forward/node.tag/node.def index 257eb0f..e1ba954 100644 --- a/templates/show/ip/route/forward/node.tag/node.def +++ b/templates/show/ip/route/forward/node.tag/node.def @@ -1,3 +1,3 @@ help: Show kernel route table for a given route -allowed: echo -n '<network>' +allowed: echo -n '<x.x.x.x | x.x.x.x/x>' run: ip -s route list $5 diff --git a/templates/show/license/node.def b/templates/show/license/node.def index eadfbbf..2108f30 100644 --- a/templates/show/license/node.def +++ b/templates/show/license/node.def @@ -1,2 +1,4 @@ help: Show Vyatta license information -run: cat ${vyatta_sysconfdir}/LICENSE +run: less $_vyatta_less_options \ + --prompt=".license, page %dt of %D" \ + -- ${vyatta_sysconfdir}/LICENSE diff --git a/templates/show/log/all/node.def b/templates/show/log/all/node.def index 87e959b..069d1d4 100644 --- a/templates/show/log/all/node.def +++ b/templates/show/log/all/node.def @@ -1,2 +1,4 @@ help: Show contents of all master log files -run: ${vyatta_bindir}/vyatta-show-log-all +run: less $_vyatta_less_options \ + --prompt=".log?m, file %i of %m., page %dt of %D" \ + -- `printf "%s\n" /var/log/messages* | sort -nr` diff --git a/templates/show/log/file/node.tag/node.def b/templates/show/log/file/node.tag/node.def index a5a1c9d..9171a0c 100644 --- a/templates/show/log/file/node.tag/node.def +++ b/templates/show/log/file/node.tag/node.def @@ -1,5 +1,7 @@ -help: Show contents of user-defined log file +help: Show contents of specified user-defined log file allowed: local -a array ; array=( /var/log/user/* ) ; - echo -n ${array[@]##*/} -run: ${vyatta_bindir}/vyatta-show-log-file "$4" + [ ${#array[@]} -gt 0 ] && echo -n ${array[@]##*/} || echo -n none +run: less $_vyatta_less_options \ + --prompt=".$4 log, page %dt of %D" \ + -- /var/log/user/$4 diff --git a/templates/show/log/node.def b/templates/show/log/node.def index 5f61e1d..3d37d84 100644 --- a/templates/show/log/node.def +++ b/templates/show/log/node.def @@ -1,2 +1,4 @@ help: Show contents of current master log file -run: ${vyatta_bindir}/vyatta-show-log +run: less $_vyatta_less_options \ + --prompt=".log, page %dt of %D" \ + -- /var/log/messages diff --git a/templates/show/ntp/node.tag/node.def b/templates/show/ntp/node.tag/node.def index a4a4443..ef69a68 100644 --- a/templates/show/ntp/node.tag/node.def +++ b/templates/show/ntp/node.tag/node.def @@ -1,4 +1,4 @@ -help: Show date and time of given NTP server +help: Show date and time of specified NTP server allowed: vyatta-allowed-hosts ntp.vyatta.com ; sed -n 's/^server[ \t]\+//p' /etc/ntp.conf run: /usr/sbin/ntpdate -q ${3:-ntp.vyatta.com} diff --git a/templates/show/system/boot-messages/all/node.def b/templates/show/system/boot-messages/all/node.def index b151fc2..e414987 100644 --- a/templates/show/system/boot-messages/all/node.def +++ b/templates/show/system/boot-messages/all/node.def @@ -1,2 +1,4 @@ help: Show all kernel boot messages -run: ${vyatta_bindir}/vyatta-show-dmesg-all +run: less $_vyatta_less_options \ + --prompt=".boot-messages?m, file %i of %m., page %dt of %D" \ + -- `printf "%s\n" /var/log/dmesg* | sort -nr` diff --git a/templates/show/system/boot-messages/node.def b/templates/show/system/boot-messages/node.def index 7cfe5d3..97bbb61 100644 --- a/templates/show/system/boot-messages/node.def +++ b/templates/show/system/boot-messages/node.def @@ -1,2 +1,4 @@ help: Show most recent kernel boot messages -run: ${vyatta_bindir}/vyatta-show-dmesg +run: less $_vyatta_less_options \ + --prompt=".boot-messages, page %dt of %D" \ + -- /var/log/dmesg diff --git a/templates/show/vrrp/interface/node.def b/templates/show/vrrp/interface/node.def index eec2ae7..79480a1 100644 --- a/templates/show/vrrp/interface/node.def +++ b/templates/show/vrrp/interface/node.def @@ -1,2 +1 @@ -help: "Show VRRP information for given interface" - +help: Show VRRP information for specified interface diff --git a/templates/show/vrrp/interface/node.tag/group/node.def b/templates/show/vrrp/interface/node.tag/group/node.def index a79e838..0af500d 100644 --- a/templates/show/vrrp/interface/node.tag/group/node.def +++ b/templates/show/vrrp/interface/node.tag/group/node.def @@ -1 +1 @@ -help: Show VRRP information for interface and group +help: Show VRRP information for specified interface and group diff --git a/templates/show/vrrp/interface/node.tag/group/node.tag/node.def b/templates/show/vrrp/interface/node.tag/group/node.tag/node.def index 84e168f..1e74e2d 100644 --- a/templates/show/vrrp/interface/node.tag/group/node.tag/node.def +++ b/templates/show/vrrp/interface/node.tag/group/node.tag/node.def @@ -1,3 +1,3 @@ -help: Show VRRP information for interface group +help: Show VRRP information for specified interface and group allowed: echo -n '<VRRP_GROUP>' run: /opt/vyatta/sbin/vyatta-show-vrrp.pl "$4" "$6" diff --git a/templates/show/vrrp/interface/node.tag/node.def b/templates/show/vrrp/interface/node.tag/node.def index 19b323e..860b12a 100644 --- a/templates/show/vrrp/interface/node.tag/node.def +++ b/templates/show/vrrp/interface/node.tag/node.def @@ -1,4 +1,4 @@ -help: Show VRRP information for interface +help: Show VRRP information for specified interface allowed: local -a array ; array=( /sys/class/net/eth* ) ; echo -n ${array[@]##*/} diff --git a/templates/show/vrrp/node.def b/templates/show/vrrp/node.def index 8f7a621..3842d98 100644 --- a/templates/show/vrrp/node.def +++ b/templates/show/vrrp/node.def @@ -1,2 +1,2 @@ -help: Show VRRP information +help: Show Virtual Router Redundancy Protocol (VRRP) information run: /opt/vyatta/sbin/vyatta-show-vrrp.pl diff --git a/templates/show/vrrp/summary/node.def b/templates/show/vrrp/summary/node.def new file mode 100644 index 0000000..c087165 --- /dev/null +++ b/templates/show/vrrp/summary/node.def @@ -0,0 +1,3 @@ +help: Show summary of VRRP information +run: /opt/vyatta/sbin/vyatta-show-vrrp.pl "$3" + diff --git a/templates/telnet/node.def b/templates/telnet/node.def index 18cd187..99b1f46 100644 --- a/templates/telnet/node.def +++ b/templates/telnet/node.def @@ -1 +1 @@ -help: telnet to <host> +help: Telnet to <hostname|IPv4 address> diff --git a/templates/telnet/node.tag/node.def b/templates/telnet/node.tag/node.def index f52266b..643b7cb 100644 --- a/templates/telnet/node.tag/node.def +++ b/templates/telnet/node.tag/node.def @@ -1,4 +1,4 @@ -help: telnet to <hostname|address> +help: Telnet to <hostname|IPv4 address> allowed: vyatta-allowed-hosts run: if [ -x /usr/bin/telnet ] ; then /usr/bin/$* diff --git a/templates/telnet/node.tag/node.tag/node.def b/templates/telnet/node.tag/node.tag/node.def index 95bffe8..70a6402 100644 --- a/templates/telnet/node.tag/node.tag/node.def +++ b/templates/telnet/node.tag/node.tag/node.def @@ -1,5 +1,5 @@ -help: telnet to <hostname|address> <port|service> -allowed: echo -n '<PORT>' +help: Telnet to <hostname|IPv4 address> <port|service> +allowed: echo -n '<0-65535>' run: if [ -x /usr/bin/telnet ] ; then /usr/bin/$* elif [ -x /bin/busybox ] ; then diff --git a/templates/terminal/key/node.def b/templates/terminal/key/node.def index 3303752..be435af 100644 --- a/templates/terminal/key/node.def +++ b/templates/terminal/key/node.def @@ -1 +1 @@ -help: Configure key behaviors +help: Set key behaviors diff --git a/templates/terminal/pager/node.def b/templates/terminal/pager/node.def index ed3262a..d2d414d 100644 --- a/templates/terminal/pager/node.def +++ b/templates/terminal/pager/node.def @@ -1,2 +1,2 @@ -help: Use default pager (less) +help: Set to use default pager (less) run: VYATTA_PAGER=$_vyatta_default_pager diff --git a/templates/traceroute/node.def b/templates/traceroute/node.def index 68ebbdc..2f618b1 100644 --- a/templates/traceroute/node.def +++ b/templates/traceroute/node.def @@ -1,4 +1,4 @@ # # Operational mode template for the "traceroute" command # -help: Track network path to remote node +help: Track network path to <hostname|IPv4 address> diff --git a/templates/traceroute/node.tag/node.def b/templates/traceroute/node.tag/node.def index 87d9c32..55acbb7 100644 --- a/templates/traceroute/node.tag/node.def +++ b/templates/traceroute/node.tag/node.def @@ -2,7 +2,13 @@ # Operational mode template for the "traceroute" command # +help: Track network path to specified <hostname|IPv4 address> allowed: vyatta-allowed-hosts -run: /usr/sbin/traceroute $2 +run: if /usr/bin/host $2 &>/dev/null + then + /usr/bin/traceroute $2 + else + echo Cannot identify $2 + fi |