summaryrefslogtreecommitdiff
path: root/templates/show/interfaces/ethernet
diff options
context:
space:
mode:
Diffstat (limited to 'templates/show/interfaces/ethernet')
-rw-r--r--templates/show/interfaces/ethernet/detail/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.tag/brief/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.tag/node.def12
-rw-r--r--templates/show/interfaces/ethernet/node.tag/physical/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.tag/brief/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def8
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def2
8 files changed, 20 insertions, 12 deletions
diff --git a/templates/show/interfaces/ethernet/detail/node.def b/templates/show/interfaces/ethernet/detail/node.def
new file mode 100644
index 0000000..9883539
--- /dev/null
+++ b/templates/show/interfaces/ethernet/detail/node.def
@@ -0,0 +1,2 @@
+help: Show ethernet interface information
+run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf-type=ethernet --action=show
diff --git a/templates/show/interfaces/ethernet/node.def b/templates/show/interfaces/ethernet/node.def
index 9ece668..5c31928 100644
--- a/templates/show/interfaces/ethernet/node.def
+++ b/templates/show/interfaces/ethernet/node.def
@@ -1,2 +1,2 @@
help: Show ethernet interface information
-run: ${vyatta_bindir}/vyatta-show-interfaces ethernet
+run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf-type=ethernet --action=show-brief
diff --git a/templates/show/interfaces/ethernet/node.tag/brief/node.def b/templates/show/interfaces/ethernet/node.tag/brief/node.def
new file mode 100644
index 0000000..52b3870
--- /dev/null
+++ b/templates/show/interfaces/ethernet/node.tag/brief/node.def
@@ -0,0 +1,2 @@
+help: Show given ethernet interface information
+run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf=$4 --action=show-brief
diff --git a/templates/show/interfaces/ethernet/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/node.def
index cf3e112..3dab472 100644
--- a/templates/show/interfaces/ethernet/node.tag/node.def
+++ b/templates/show/interfaces/ethernet/node.tag/node.def
@@ -1,5 +1,9 @@
help: Show given ethernet interface information
-allowed: local -a array ;
- array=( /sys/class/net/{eth,vmnet}* ) ;
- echo -n ${array[@]##*/}
-run: ${vyatta_bindir}/vyatta-show-interfaces ethernet $4
+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
+run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf=$4
diff --git a/templates/show/interfaces/ethernet/node.tag/physical/node.def b/templates/show/interfaces/ethernet/node.tag/physical/node.def
index a9628fd..98f0170 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
allowed: ""
-run: sudo ${vyatta_bindir}/sudo-users/ethtool $4
+run: sudo ${vyatta_bindir}/sudo-users/ethtool $4; sudo ${vyatta_bindir}/sudo-users/ethtool -i $4
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
new file mode 100644
index 0000000..956be62
--- /dev/null
+++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/brief/node.def
@@ -0,0 +1,2 @@
+help: Show given virtual network interface 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 68d3b02..813637b 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,5 +1,5 @@
help: Show given virtual network interface information
-allowed: for eth in /sys/class/net/eth${4}.* ; do
- echo ${eth/*eth${4}./} ;
- done
-run: ${vyatta_bindir}/vyatta-show-interfaces ethernet $4 vif $6
+allowed: local -a array ;
+ array=( /sys/class/net/${COMP_WORDS[3]}.* ) ;
+ echo -n ${array[@]##*.}
+run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf=$4.$6
diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def
deleted file mode 100644
index 9769aaa..0000000
--- a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-help: Show given virtual network interface pseudo-physical information
-run: sudo ${vyatta_bindir}/sudo-users/ethtool $4.$6