From 690d1c109146d3cafb247ed896ab637707fee053 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 20 Mar 2008 08:47:07 -0700 Subject: Fix error messages from ethtool leaking out This reverts commit ff77155be360216289e1e73af50dc4b82383cc68. --- scripts/VyattaQosUtil.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts/VyattaQosUtil.pm') 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: -- cgit v1.2.3