summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
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: