diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2008-04-14 15:31:11 -0700 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2008-04-14 15:31:11 -0700 |
commit | 79954f9cd170ff656cd64f764b824db8fa145bfe (patch) | |
tree | 5730c953ad8b835882566b38b27f5c8820716bf7 /scripts | |
parent | 1a34530e80408b65fac1806c90b1d280e24d9a79 (diff) | |
download | vyatta-op-79954f9cd170ff656cd64f764b824db8fa145bfe.tar.gz vyatta-op-79954f9cd170ff656cd64f764b824db8fa145bfe.zip |
Enable display of info about ADSL interfaces.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-show-interfaces | 10 | ||||
-rw-r--r-- | scripts/vyatta-show-interfaces.pl | 1 |
2 files changed, 8 insertions, 3 deletions
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', ); |