Date: Wed, 28 May 2008 08:25:50 +0200 From: Ian FREISLICH <ianf@clue.co.za> To: current@freebsd.org Subject: Unconditional 30s boot delay. Message-ID: <E1K1F6c-0000iY-4v@clue.co.za>
next in thread | raw e-mail | index | archive | help
Hi
Recently my systems using DHCP have introduced an unconditional 30 second delay in the boot-up time. The cause is this:
/etc/rc.d/routing:
routing_start()
{
static_start
options_start
# Return without waiting if we don't have dhcp interfaces.
# Once we can test that the link is actually up, we should
# remove this test and always wait.
dhcp_interfaces=`list_net_interfaces dhcp`
[ -z "`list_net_interfaces dhcp`" ] && return
# Wait for a default route
delay=${if_up_delay}
while [ ${delay} -gt 0 ]; do
defif=`get_default_if -inet`
if [ -n "${defif}" ]; then
if [ ${delay} -ne ${if_up_delay} ]; then
echo "($defif)"
fi
break
fi
if [ ${delay} -eq ${if_up_delay} ]; then
echo -n "Waiting ${delay}s for an interface to come up: "
else
echo -n .
fi
sleep 1
delay=`expr $delay - 1`
done
}
Which is fine and well if routing runs *after* the DHCP request,
but it doesn't it runs before devd is started so the default route
from DHCP is never acquired and we wait... for 30s....
And this needs an "echo" after the "done" so that the next script's
output lands up at the start of the next line.
Ian
--
Ian Freislich
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1K1F6c-0000iY-4v>
