diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-02-11 14:10:08 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-02-11 14:10:08 -0800 |
commit | ed07cff15234b716d58c52dcf315ddc493d896e7 (patch) | |
tree | 86e1d8d2bb7c1f852b719c8b12fbb97ce30ac6af /templates/show | |
parent | 7d74c1863204dd7666f1b9085828eee374893d3c (diff) | |
download | vyatta-op-ed07cff15234b716d58c52dcf315ddc493d896e7.tar.gz vyatta-op-ed07cff15234b716d58c52dcf315ddc493d896e7.zip |
Use vyatta-interfaces --show to display allowed types
Simple way to handle interface names for allowed:
Diffstat (limited to 'templates/show')
4 files changed, 4 insertions, 18 deletions
diff --git a/templates/show/interfaces/bonding/node.tag/node.def b/templates/show/interfaces/bonding/node.tag/node.def index 0cf4016..c2f1349 100644 --- a/templates/show/interfaces/bonding/node.tag/node.def +++ b/templates/show/interfaces/bonding/node.tag/node.def @@ -1,7 +1,3 @@ help: Show specified bonding interface information -allowed: for dev in /sys/class/net/*; - do if [[ -d $dev/bonding ]] - then echo -n ${dev##*/} " " - fi - done +allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show bonding run: ${vyatta_bindir}/vyatta-show-bonding.pl "$4" diff --git a/templates/show/interfaces/bridge/node.tag/node.def b/templates/show/interfaces/bridge/node.tag/node.def index d2c5eec..18713b8 100644 --- a/templates/show/interfaces/bridge/node.tag/node.def +++ b/templates/show/interfaces/bridge/node.tag/node.def @@ -1,5 +1,3 @@ help: Show specified bridge interface information -allowed: local -a array ; - array=( /sys/class/net/br* ) ; - echo -n ${array[@]##*/} +allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show bridge run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4" diff --git a/templates/show/interfaces/ethernet/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/node.def index 57a5623..5563032 100644 --- a/templates/show/interfaces/ethernet/node.tag/node.def +++ b/templates/show/interfaces/ethernet/node.tag/node.def @@ -1,9 +1,3 @@ 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 ]] - then echo -n ${dev##*/} " " - fi - fi - done +allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show ethernet run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4" diff --git a/templates/show/interfaces/tunnel/node.tag/node.def b/templates/show/interfaces/tunnel/node.tag/node.def index 6818464..2382af4 100644 --- a/templates/show/interfaces/tunnel/node.tag/node.def +++ b/templates/show/interfaces/tunnel/node.tag/node.def @@ -1,5 +1,3 @@ help: Show specified tunnel interface information -allowed: local -a array ; - array=( /sys/class/net/tun* ) ; - echo -n ${array[@]##*/} +allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show tunnel run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4" |