diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-09 11:07:31 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@lenny.localdomain> | 2009-10-01 13:51:19 -0700 |
commit | e0f015e97b01a0e1f3349e74e5b8c9f2b862022d (patch) | |
tree | 96508f58d059ec3e7ffcae729ef23c69af2624f8 /lib/Vyatta | |
parent | 673b1bf04db2832596b07eb0e6abb1a0e6bf4217 (diff) | |
download | vyatta-cfg-qos-e0f015e97b01a0e1f3349e74e5b8c9f2b862022d.tar.gz vyatta-cfg-qos-e0f015e97b01a0e1f3349e74e5b8c9f2b862022d.zip |
Use sudo when getting speed
Ethtool doesn't allow non-root user to read settings (in mainline kernel).
(cherry picked from commit 767fa8a7e2afeb1d53838a6f544fa1232aef39da)
Diffstat (limited to 'lib/Vyatta')
-rw-r--r-- | lib/Vyatta/Qos/Util.pm | 2 |
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: |