summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-09 11:07:31 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-10 09:50:03 -0700
commit767fa8a7e2afeb1d53838a6f544fa1232aef39da (patch)
tree00653fc3c34c5f27dd24114c021c701e71f5192d
parent8a9faf63f172a37fc12f43e504f94ce92d863a1a (diff)
downloadvyatta-cfg-qos-767fa8a7e2afeb1d53838a6f544fa1232aef39da.tar.gz
vyatta-cfg-qos-767fa8a7e2afeb1d53838a6f544fa1232aef39da.zip
Use sudo when getting speed
Ethtool doesn't allow non-root user to read settings (in mainline kernel).
-rw-r--r--lib/Vyatta/Qos/Util.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Vyatta/Qos/Util.pm b/lib/Vyatta/Qos/Util.pm
index 242e2b4..9686120 100644
--- a/lib/Vyatta/Qos/Util.pm
+++ b/lib/Vyatta/Qos/Util.pm
@@ -300,7 +300,7 @@ sub ethtoolRate {
# Get rate of real device (ignore vlan)
$dev =~ s/\.[0-9]+$//;
- open( my $ethtool, "/usr/sbin/ethtool $dev 2>/dev/null |" )
+ open( my $ethtool, "sudo /usr/sbin/ethtool $dev 2>/dev/null |" )
or die "ethtool failed: $!\n";
# ethtool produces: