From 79954f9cd170ff656cd64f764b824db8fa145bfe Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Mon, 14 Apr 2008 15:31:11 -0700 Subject: Enable display of info about ADSL interfaces. --- scripts/vyatta-show-interfaces | 10 +++++++--- scripts/vyatta-show-interfaces.pl | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'scripts') 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 0ec5d3e..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', ); -- cgit v1.2.3