Commit d0cec88f authored by Mike Hibler's avatar Mike Hibler

ethtool is in /sbin (not /usr/sbin) in RHL9; check for both paths

parent 6481f6b2
......@@ -273,13 +273,20 @@ sub os_ifconfig_line($$$$$$$;$$)
# interface (e1000), and some (eepro100) support the new interface just
# enough that they can report success but not actually do anything. Sweet!
#
if (-e "/usr/sbin/ethtool") {
my $ethtool;
if (-e "/sbin/ethtool") {
$ethtool = "/sbin/ethtool";
} elsif (-e "/usr/sbin/ethtool") {
$ethtool = "/usr/sbin/ethtool";
}
if (defined($ethtool)) {
# this seems to work for returning an error on eepro100
$uplines = "if /usr/sbin/ethtool $iface >/dev/null 2>&1; then\n " .
" /usr/sbin/ethtool -s $iface autoneg off speed $speed duplex $duplex\n " .
"else\n " .
" /sbin/mii-tool --force=$media $iface\n " .
"fi\n ";
$uplines =
"if $ethtool $iface >/dev/null 2>&1; then\n " .
" $ethtool -s $iface autoneg off speed $speed duplex $duplex\n " .
"else\n " .
" /sbin/mii-tool --force=$media $iface\n " .
"fi\n ";
} else {
$uplines = "/sbin/mii-tool --force=$media $iface\n ";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment