Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Nov 2011 10:32:15 -0800
From:      "Robison, Dave" <david.robison@fisglobal.com>
To:        <freebsd-questions@freebsd.org>
Subject:   Re: ntpdate on boot problem
Message-ID:  <4EB8242F.4030405@fisglobal.com>
In-Reply-To: <CA%2BQLa9BOozP544LB7MwzjvXqHPLxgfU0w_nr%2BWv9bQtexFMjbw@mail.gmail.com>
References:  <CA%2BQLa9BOozP544LB7MwzjvXqHPLxgfU0w_nr%2BWv9bQtexFMjbw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/05/2011 14:52, Robert Simmons wrote:
> Is there a way to make sure that the interface is UP and working
> before running ntpdate at boot on a box with a static IP address?
>
> After setting ntpdate_enable="YES" in rc.conf, I get the following
> error on boot:
>
> Setting date via ntp.
> Error : hostname nor servname provided, or not known
>   5 Nov 17:11:05
> ntpdate[786]: can't find host 0.freebsd.pool.ntp.org
>
> Error : hostname nor servname provided, or not known
>   5 Nov 17:11:05
> ntpdate[786]: can't find host 1.freebsd.pool.ntp.org
>
> Error : hostname nor servname provided, or not known
>   5 Nov 17:11:05
> ntpdate[786]: can't find host 2.freebsd.pool.ntp.org
>
>   5 Nov 17:11:05
> ntpdate[786]: no servers can be used, exiting
>
> I've had this problem with machines using DHCP and the solution was to
> use SYNCDHCP rather than DHCP in rc.conf.  However, this box is using
> a static IP address.  But the problem seems to be similar.
>
> Rob
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>



I believe the easiest answer to your question is to do the following in 
/etc/rc.conf:

netwait_enable="YES"
netwait_ip="$defaultrouter"

This will cause your interface to wait until it can ping the default router.

http://lists.freebsd.org/pipermail/freebsd-rc/2010-June/001987.html

Enjoy,

Dave


-- 
Dave Robison
Sales Solution Architect II
FIS Banking Solutions
510/621-2089 (w)
530/518-5194 (c)
510/621-2020 (f)
daver@vicor.com
david.robison@fisglobal.com

_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EB8242F.4030405>