summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2008-09-30 15:18:00 -0700
committerBob Gilligan <gilligan@vyatta.com>2008-09-30 15:18:00 -0700
commit9d0f80182a2aa3a0d9eb91d3902b5b09e0c68657 (patch)
treee39f106f50bf808329789ee3cceed6da5122dcd6 /functions
parent1e25abc5f5b0655357b5233570dd36abb0f4f719 (diff)
downloadvyatta-op-9d0f80182a2aa3a0d9eb91d3902b5b09e0c68657.tar.gz
vyatta-op-9d0f80182a2aa3a0d9eb91d3902b5b09e0c68657.zip
Bugfix: 3333
Ensure that wanpipe stats commands executed by "show tech-support" work when the command is executed by an "operator" level user.
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/tech-support38
1 files changed, 20 insertions, 18 deletions
diff --git a/functions/tech-support b/functions/tech-support
index 5aff9dd..6974392 100755
--- a/functions/tech-support
+++ b/functions/tech-support
@@ -196,30 +196,32 @@ if [ -e /etc/wanpipe/wanrouter.rc ]; then
cat /etc/wanpipe/wanrouter.rc
fi
-for i in /etc/wanpipe/interfaces/* ; do
- if [ -e $i ]; then
- ifname=`basename $i`
- header "wanpipemon -i $ifname -c sc"
- wanpipemon -i $ifname -c sc
+wanifs=( /sys/class/net/wan* )
+wanifs=`echo -n ${wanifs[@]##*/}`
+
+echo "wanifs are $wanifs"
+
+for ifname in $wanifs ; do
+ header "wanpipemon -i $ifname -c sc"
+ sudo wanpipemon -i $ifname -c sc
- header "wanpipemon -i $ifname -c so"
- wanpipemon -i $ifname -c so
+ header "wanpipemon -i $ifname -c so"
+ sudo wanpipemon -i $ifname -c so
- header "wanpipemon -i $ifname -c xcv"
- wanpipemon -i $ifname -c xcv
+ header "wanpipemon -i $ifname -c xcv"
+ sudo wanpipemon -i $ifname -c xcv
- header "wanpipemon -i $ifname -c xru"
- wanpipemon -i $ifname -c xru
+ header "wanpipemon -i $ifname -c xru"
+ sudo wanpipemon -i $ifname -c xru
- header "wanpipemon -i $ifname -c xm"
- wanpipemon -i $ifname -c xm
+ header "wanpipemon -i $ifname -c xm"
+ sudo wanpipemon -i $ifname -c xm
- header "wanpipemon -i $ifname -c xl"
- wanpipemon -i $ifname -c xl
+ header "wanpipemon -i $ifname -c xl"
+ sudo wanpipemon -i $ifname -c xl
- header "wanpipemon -i $ifname -c Ta"
- wanpipemon -i $ifname -c Ta
- fi
+ header "wanpipemon -i $ifname -c Ta"
+ sudo wanpipemon -i $ifname -c Ta
done
for i in /etc/wanpipe/wanpipe*.conf ; do