On Thu, 2004-01-29 at 10:41, John Turner wrote: > We use this for forcing the duplex to 100 at boot time. > > # more /sbin/ifup-pre-local > #!/bin/sh > if test "x$1" = "xeth0"; then > /sbin/ifconfig eth0 up > /sbin/ethtool -s eth0 autoneg off speed 100 duplex full > fi > exit 0 > > # > > John Now my question is where to do this. I think I could insert this kind of thing into my /etc/rc.d/init.d/network file just after the section I've pasted below. I doubt that this is the "right way" to do it. I would feel better about doing custom stuff in rc.local, but I need the speed and duplex to be right before I attempt to mount /home off an NFS server. Forcing these settings from rc.local would be too late. My guess is that the /sbin/if-pre-local in John's example is a home grown thing. What calls it? Any advice?
//From my Redhat 9 /etc/rc.d/init.d/network
# bring up all other interfaces configured to come up at boot time
for i in $interfaces; do
eval $(LANG=C fgrep "DEVICE=" ifcfg-$i)
if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi
if [ "${DEVICE##cipcb}" != "$DEVICE" ] ; then
cipeinterfaces="$cipeinterfaces $DEVICE"
continue
fi
if LANG=C egrep -L "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null
; then
# this loads the module, to preserve ordering
is_available $i
continue
fi
# If we're in confirmation mode, get user confirmation
[ -n "$CONFIRM" ] &&
{
confirm $i
case $? in
0)
:
;;
2)
CONFIRM=
;;
*)
continue
;;
esac
}
action $"Bringing up interface $i: " ./ifup $i boot
done
--
Ryan Leathers <[EMAIL PROTECTED]>
Global Knowledge
signature.asc
Description: This is a digitally signed message part
-- TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ : http://trilug.org/faq/ TriLUG Member Services FAQ : http://members.trilug.org/services_faq/ TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
