summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-12 22:35:10 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-13 07:26:00 -0800
commit071581202370d9014c83f2314b4c21bc442eda60 (patch)
treea02bef1736d93df1c743a0354973be6325367c12
parent730dc16c1ddcc8480dba094d952f115a7c776d0a (diff)
downloadvyatta-op-071581202370d9014c83f2314b4c21bc442eda60.tar.gz
vyatta-op-071581202370d9014c83f2314b4c21bc442eda60.zip
Add clear interfaces pseudo-ethernet
-rw-r--r--templates/clear/interfaces/pseudo-ethernet/counters/node.def2
-rw-r--r--templates/clear/interfaces/pseudo-ethernet/node.def1
-rw-r--r--templates/clear/interfaces/pseudo-ethernet/node.tag/counters/node.def2
-rw-r--r--templates/clear/interfaces/pseudo-ethernet/node.tag/node.def4
4 files changed, 9 insertions, 0 deletions
diff --git a/templates/clear/interfaces/pseudo-ethernet/counters/node.def b/templates/clear/interfaces/pseudo-ethernet/counters/node.def
new file mode 100644
index 0000000..33d0165
--- /dev/null
+++ b/templates/clear/interfaces/pseudo-ethernet/counters/node.def
@@ -0,0 +1,2 @@
+help: Clear all pseudo-ethernet interface counters
+run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf-type="$3"
diff --git a/templates/clear/interfaces/pseudo-ethernet/node.def b/templates/clear/interfaces/pseudo-ethernet/node.def
new file mode 100644
index 0000000..b70f282
--- /dev/null
+++ b/templates/clear/interfaces/pseudo-ethernet/node.def
@@ -0,0 +1 @@
+help: Clear pseudo-ethernet interface information
diff --git a/templates/clear/interfaces/pseudo-ethernet/node.tag/counters/node.def b/templates/clear/interfaces/pseudo-ethernet/node.tag/counters/node.def
new file mode 100644
index 0000000..8585a09
--- /dev/null
+++ b/templates/clear/interfaces/pseudo-ethernet/node.tag/counters/node.def
@@ -0,0 +1,2 @@
+help: Clear interface counters for a given pseudo-ethernet interface
+run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf="$4"
diff --git a/templates/clear/interfaces/pseudo-ethernet/node.tag/node.def b/templates/clear/interfaces/pseudo-ethernet/node.tag/node.def
new file mode 100644
index 0000000..25915b4
--- /dev/null
+++ b/templates/clear/interfaces/pseudo-ethernet/node.tag/node.def
@@ -0,0 +1,4 @@
+help: Clear interface information for a given pseudo-ethernet interface
+allowed: local -a array ;
+ array=( /sys/class/net/peth* ) ;
+ echo -n ${array[@]##*/}