diff options
author | Tom Grennan <tgrennan@vyatta.com> | 2007-09-17 14:01:46 -0700 |
---|---|---|
committer | Tom Grennan <tgrennan@vyatta.com> | 2007-09-17 14:01:46 -0700 |
commit | eb51e368fa9cc2d1a016b888512aa05b02392667 (patch) | |
tree | 6c94da0db0b2dc6d0f56897d14f3b4a2d594c1f9 /templates/show/interfaces/ethernet | |
parent | 42b11e866ee4cfc20059d5a1ad36c8eda3ba1ef9 (diff) | |
download | vyatta-op-eb51e368fa9cc2d1a016b888512aa05b02392667.tar.gz vyatta-op-eb51e368fa9cc2d1a016b888512aa05b02392667.zip |
rename op-templates
Diffstat (limited to 'templates/show/interfaces/ethernet')
6 files changed, 21 insertions, 0 deletions
diff --git a/templates/show/interfaces/ethernet/node.def b/templates/show/interfaces/ethernet/node.def new file mode 100644 index 0000000..9d70e68 --- /dev/null +++ b/templates/show/interfaces/ethernet/node.def @@ -0,0 +1,2 @@ +help: "Show ethernet interface information" +run: ${ofr_bindir}/show_interfaces_ethernet diff --git a/templates/show/interfaces/ethernet/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/node.def new file mode 100644 index 0000000..df23e1d --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/node.def @@ -0,0 +1,5 @@ +help: "Show given ethernet interface information" +allowed: local -a array ; + array=( /sys/class/net/{eth,vmnet}* ) ; + echo -n ${array[@]##*/} +run: ${ofr_bindir}/show_interfaces_ethernet $4 diff --git a/templates/show/interfaces/ethernet/node.tag/physical/node.def b/templates/show/interfaces/ethernet/node.tag/physical/node.def new file mode 100644 index 0000000..9e907d1 --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/physical/node.def @@ -0,0 +1,3 @@ +help: "Show physical device information of given ethernet interface" +allowed: "" +run: sudo ethtool $4 diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.def new file mode 100644 index 0000000..66490a7 --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/vif/node.def @@ -0,0 +1,4 @@ +help: "Show given virtual network interface 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/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def new file mode 100644 index 0000000..6e114d8 --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def @@ -0,0 +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: ${ofr_bindir}/show_interfaces_ethernet $4 vif $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 new file mode 100644 index 0000000..56f986f --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def @@ -0,0 +1,2 @@ +help: "Show given virtual network interface pseudo-physical information" +run: ${ofr_bindir}/show_interfaces_ethernet $4 vif $6 physical |