From 6285193ed1a9b4cf2b85ce6d4f44942663137c48 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 8 Nov 2010 13:23:21 -0800 Subject: Fix path to ethtool In Debian Squeeze ethtool is in /sbin --- scripts/vyatta-interfaces.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') 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 { -- cgit v1.2.3