diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-08 13:23:21 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-08 13:23:21 -0800 |
commit | 6285193ed1a9b4cf2b85ce6d4f44942663137c48 (patch) | |
tree | 2c128d6863ce9df8fb782a216b9d5f6ff2a0329f /scripts | |
parent | 69268663f9fb58fd6d60cc866f8e4cbe2f77ea47 (diff) | |
download | vyatta-cfg-quagga-6285193ed1a9b4cf2b85ce6d4f44942663137c48.tar.gz vyatta-cfg-quagga-6285193ed1a9b4cf2b85ce6d4f44942663137c48.zip |
Fix path to ethtool
In Debian Squeeze ethtool is in /sbin
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-interfaces.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index 56abfbf2..2d91a5c0 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -46,6 +46,7 @@ use strict; use warnings; my $dhcp_daemon = '/sbin/dhclient'; +my $ETHTOOL = '/sbin/ethtool'; my ($eth_update, $eth_delete, $addr_set, $dev, $mac, $mac_update); my %skip_interface; @@ -567,7 +568,7 @@ sub show_interfaces { sub get_ethtool { my $dev = shift; - open( my $ethtool, "-|", "sudo /usr/sbin/ethtool $dev 2>/dev/null" ) + open( my $ethtool, "-|", "$ETHTOOL $dev 2>/dev/null" ) or die "ethtool failed: $!\n"; # ethtool produces: @@ -609,7 +610,7 @@ sub set_speed_duplex { } } - my $cmd = "sudo /usr/sbin/ethtool -s $intf"; + my $cmd = "sudo $ETHTOOL -s $intf"; if ($nspeed eq 'auto') { $cmd .= " autoneg on"; } else { |