shortening waiting time for ntpdate on bootup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ntp (Ubuntu) |
Fix Released
|
Medium
|
Scott James Remnant (Canonical) |
Bug Description
Dapper latest update (11/04/2006).
ntpdate 4.2.0a+
If interface
is not lo
AND
is configured as auto in /etc/network/
AND
internet connection absent
system boot up takes long time, waiting until ntpdate lookups time host.
To reproduce problem:
1. Comment DNS servers in /etc/resolv.conf or comment gateway from configuration.
2. Stop networking /etc/init.
3. Reboot system or just stop-start networking by /etc/init.
You will wait long time until network interface will be configured.
I suggest to put ntpdate process in background or using mechanism for checking if internet is available.
Like this if enough availability of DNS server:
--- ntpdate 2006-02-08 19:44:00.000000000 +0200
+++ ntpdate.new 2006-04-11 12:59:12.000000000 +0300
@@ -13,5 +13,8 @@
fi
+/bin/ping -q -c1 -W1 \
+ `/bin/grep -m1 "^nameserver" /etc/resolv.conf| /usr/bin/awk '{print $2}'` > /dev/null 2>&1 || exit 0
+
[ "$VERBOSITY" = 1 ] && echo "Synchronizing clock to $NTPSERVERS..."
/usr/sbin/ntpdate -b -s $NTPOPTIONS $NTPSERVERS || true
As for me is enough DNS server availability.
But in general I think we need to check $NTPSERVERS. Something like this:
/bin/ping -q -c1 -W3 $NTPSERVERS > /dev/null 2>&1 || exit 0
I putted 3 second here for TTL.
Changed in ntp: | |
status: | Fix Released → Unconfirmed |
ntpdate is run from an ifup script in dapper., which means nothing is waiting for it.
You may find that you are also experiencing bug #38787 which is why it's waiting at "Configuring network interfaces" rather than carrying on