summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-20 08:47:07 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-20 08:48:39 -0700
commit690d1c109146d3cafb247ed896ab637707fee053 (patch)
tree5cf165ef5583ba2eaea530e6e51fe0c9d555b231 /scripts
parente2773504354d08d67d64ec7d27530abb8b4c8075 (diff)
downloadvyatta-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.pm5
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: