Re: ntpd fails on boot

2010-12-19 Thread Mark Andrews
In message 20101218220244.ga19...@icarus.home.lan, Jeremy Chadwick writes: On Sat, Dec 18, 2010 at 11:37:21AM -0700, Dan Allen wrote: On 14 Dec 2010, at 5:47 PM, Jeremy Chadwick wrote: Anyway, many people are using the below with success. Sorry to say that netwait did NOT in the

Re: ntpd fails on boot

2010-12-18 Thread Dan Allen
On 14 Dec 2010, at 5:47 PM, Jeremy Chadwick wrote: Anyway, many people are using the below with success. Sorry to say that netwait did NOT in the end fix the problem. I however discovered that if I put synchronous_dhclient=YES into my /etc/rc.conf file, that over many days reboots now

Re: ntpd fails on boot

2010-12-18 Thread Jeremy Chadwick
On Sat, Dec 18, 2010 at 11:37:21AM -0700, Dan Allen wrote: On 14 Dec 2010, at 5:47 PM, Jeremy Chadwick wrote: Anyway, many people are using the below with success. Sorry to say that netwait did NOT in the end fix the problem. I however discovered that if I put

Re: ntpd fails on boot

2010-12-16 Thread Michael Voorhis
My high-tech solution to NTPDATE (et.al.) running before the link was up was to edit /etc/rc.d/NETWORKING and append these two lines at the bottom of the file: == /bin/echo Waiting 10s for network link to wake up. /bin/sleep 10 == This has solved this startup problem in all the cases

Re: ntpd fails on boot

2010-12-15 Thread Guido Falsi
On Tue, Dec 14, 2010 at 06:02:53PM -0800, Jeremy Chadwick wrote: For example: if you have two NICs (LAN and WLAN), both of which are connected + configured during network configuration time, and both go to the Internet, then it really doesn't matter which interface you choose in netwait_if.

Re: ntpd fails on boot

2010-12-15 Thread Dan Allen
On 14 Dec 2010, at 7:02 PM, Jeremy Chadwick wrote: The design model of these daemons is to assume network connectivity is working when they start, and netwait reliably ensures that. Thanks Jeremy for the script. It works like a charm on my system, fixing the problem. Dan

ntpd fails on boot

2010-12-14 Thread Dan Allen
Recently my network connection now is setup AFTER ntpd is launched rather than before. So when ntpd starts there is no net connection and it gives up. I read /usr/src/UPDATING but nothing is mentioned about a change in boot order. Any ideas? Thanks, Dan Allen

Re: ntpd fails on boot

2010-12-14 Thread Chuck Swiger
On Dec 14, 2010, at 4:38 PM, Dan Allen wrote: Recently my network connection now is setup AFTER ntpd is launched rather than before. So when ntpd starts there is no net connection and it gives up. Change the REQUIRE line in /etc/rc.d/ntpd to indicate whatever dependency you need to have so

Re: ntpd fails on boot

2010-12-14 Thread Jeremy Chadwick
On Tue, Dec 14, 2010 at 05:38:49PM -0700, Dan Allen wrote: Recently my network connection now is setup AFTER ntpd is launched rather than before. So when ntpd starts there is no net connection and it gives up. I read /usr/src/UPDATING but nothing is mentioned about a change in boot

Re: ntpd fails on boot

2010-12-14 Thread Jeremy Chadwick
On Tue, Dec 14, 2010 at 04:46:10PM -0800, Chuck Swiger wrote: On Dec 14, 2010, at 4:38 PM, Dan Allen wrote: Recently my network connection now is setup AFTER ntpd is launched rather than before. So when ntpd starts there is no net connection and it gives up. Change the REQUIRE line

Re: ntpd fails on boot

2010-12-14 Thread Chuck Swiger
On Dec 14, 2010, at 4:47 PM, Jeremy Chadwick wrote: [ ... ] Change the REQUIRE line in /etc/rc.d/ntpd to indicate whatever dependency you need to have so that your network connection is up before ntpd tries to run. man rcorder is informative It's not that simple. Shrug-- if there is

Re: ntpd fails on boot

2010-12-14 Thread Zhihao Yuan
ping is slow. I hope that we can change the behavior of detecting network to something event driven. Like to insert a script into syslogd to detect the host's dhclient status (in a static IP environment, we don't need 'netwait'), or check ifconfig, something like that. On Tue, Dec 14, 2010 at

Re: ntpd fails on boot

2010-12-14 Thread Jeremy Chadwick
On Tue, Dec 14, 2010 at 06:55:22PM -0600, Zhihao Yuan wrote: ping is slow. I hope that we can change the behavior of detecting network to something event driven. Like to insert a script into syslogd to detect the host's dhclient status (in a static IP environment, we don't need 'netwait'), or

Re: ntpd fails on boot

2010-12-14 Thread Zhihao Yuan
I read your script. OK. My question is, how can I use more than 1 netwait_if? I know I can just use netwait_ip instead, but, for example, in a mDNS configured environment, ping may take a long time to response. In some conditions, it can be 1min. So I don't want to use the fallback 'ping' method.

Re: ntpd fails on boot

2010-12-14 Thread Dan Allen
On 14 Dec 2010, at 5:47 PM, Jeremy Chadwick wrote: This issue has been discussed pretty thoroughly in the past. There's no official solution, but there is an rc.d script I wrote which addresses this shortcoming. Nothing related to the boot order has changed, but network drivers and overall

Re: ntpd fails on boot

2010-12-14 Thread Jeremy Chadwick
On Tue, Dec 14, 2010 at 07:43:04PM -0600, Zhihao Yuan wrote: I read your script. OK. My question is, how can I use more than 1 netwait_if? I know I can just use netwait_ip instead, but, for example, in a mDNS configured environment, ping may take a long time to response. In some conditions, it

Re: ntpd fails on boot

2010-12-14 Thread Jonathan Chen
On Tue, Dec 14, 2010 at 05:38:49PM -0700, Dan Allen wrote: Recently my network connection now is setup AFTER ntpd is launched rather than before. So when ntpd starts there is no net connection and it gives up. Let me guess: You're on a DHCP network and the network script are running before