diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-20 08:47:07 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-20 08:48:39 -0700 |
commit | 690d1c109146d3cafb247ed896ab637707fee053 (patch) | |
tree | 5cf165ef5583ba2eaea530e6e51fe0c9d555b231 /scripts | |
parent | e2773504354d08d67d64ec7d27530abb8b4c8075 (diff) | |
download | vyatta-cfg-qos-690d1c109146d3cafb247ed896ab637707fee053.tar.gz vyatta-cfg-qos-690d1c109146d3cafb247ed896ab637707fee053.zip |
Fix error messages from ethtool leaking out
This reverts commit ff77155be360216289e1e73af50dc4b82383cc68.
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..87e9519 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>/dev/null |") or die "ethtool failed: $!\n"; # ethtool produces: |