diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/VyattaQosUtil.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/VyattaQosUtil.pm b/scripts/VyattaQosUtil.pm index 86b091a..1e77179 100644 --- a/scripts/VyattaQosUtil.pm +++ b/scripts/VyattaQosUtil.pm @@ -169,7 +169,9 @@ sub ethtoolRate { my ($dev) = @_; my $rate = undef; - open my $ethtool, "ethtool $dev |" or die "ethtool failed: $!\n"; + open my $ethtool, "-|" + or exec 'sudo', 'ethtool', $dev + or die "ethtool failed: $!\n"; # ethtool produces: # |