diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-19 12:14:26 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-19 12:14:26 -0700 |
commit | c1b530e7bfa5c33a8f51f634f906d2412f187e90 (patch) | |
tree | f43cca30b984106f06a8603a5c2e1c11e5f33281 /scripts | |
parent | e1624917ba2ed574fe350b470762a732a9820cbd (diff) | |
download | vyatta-cfg-qos-c1b530e7bfa5c33a8f51f634f906d2412f187e90.tar.gz vyatta-cfg-qos-c1b530e7bfa5c33a8f51f634f906d2412f187e90.zip |
silence ethtool messages when auto bandwidth used
If device doesn't support full ethtool, then ethtool error messages
were leaking out to console, when QOS bandwidth was detecting interface
speed.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/VyattaQosUtil.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/VyattaQosUtil.pm b/scripts/VyattaQosUtil.pm index 476d651..145a627 100644 --- a/scripts/VyattaQosUtil.pm +++ b/scripts/VyattaQosUtil.pm @@ -198,11 +198,10 @@ sub interfaceRate { ## ethtoolRate("eth0") # Fetch actual rate using ethtool and format to valid tc rate sub ethtoolRate { - my ($dev) = @_; + my $dev = shift; my $rate = undef; - open my $ethtool, "-|" - or exec 'sudo', 'ethtool', $dev + open(my $ethtool, "/usr/sbin/ethtool $dev 2>&1 |") or die "ethtool failed: $!\n"; # ethtool produces: |