On 24 Aug 2004 09:48:41 -0700, Gary Smith wrote:
> Hello,
>
> I just upgraded my laptop to FC2 and noticed one major difference from
> RH9.0. When I'm on the road booting it up FC2 waits about 60-90
> seconds while initializing eth0 before it times out. I think it was
> more like 15 seconds on RH9. Is there a way to change the timeout
> value when detecting that there is no network? For that matter, is
> there a way to tell it not to even try if there is no network cable
> installed? I'm sure it's timing out looking for a DHCP server which
> it shouldn't be because there's no cable.
You can control that boot sequence with the contents of
/etc/sysconfig/network-scripts/ifcfg-eth0
You could create a scipt to run mii-tool to test the link
and copy in a /etc/sysconfig/network-scripts/ifcfg-eth0 with
ONBOOT=yes or no depending on what you get from mii-tool
If you look at /etc/rc.d/init.d/network you will see a line like
# chkconfig: 2345 10 90
which says to bring up network with S10network for runlevels 2,3,4,5.
You would create a script, say ck_network which would be called before
S10network.
If your run the install procesure below correctly, and do a
ls -1 /etc/rc.d/rc3.d/S*network*
you would see something like
/etc/rc.d/rc3.d/S10ck_network
/etc/rc.d/rc3.d/S10network
which indicates it will run before network.
Quick untested kludge follows and if you need script knowledge
http://www.tldp.org/LDP/abs/html/index.html
-----8<-----8<-----8<- ck_network script cut below this line 8<-----8<-----8<
#! /bin/bash
#
# ck_network check networking eth0
#
# chkconfig: 2345 10 90
#
# Install procedure:
# cp ck_network /etc/rc.d/init.d/
# chmod +x /etc/rc.d/init.d/ck_network
# chkconfig --add ck_network
#
#
set $(mii-tool eth0)
if [ "$7" = ok" ] ; then
cp /some/dir/onboot_yes /etc/sysconfig/network-scripts/ifcfg-eth0
else
cp /some/dir/onboot_no /etc/sysconfig/network-scripts/ifcfg-eth0
fi
exit 0
#********** end ck_network ********************************