From owner-freebsd-questions@FreeBSD.ORG Sat Nov 5 22:03:49 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id EF7DB1065673; Sat, 5 Nov 2011 22:03:49 +0000 (UTC) Date: Sat, 5 Nov 2011 22:03:49 +0000 From: Alexander Best To: Robert Simmons Message-ID: <20111105220349.GA49530@freebsd.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-questions@freebsd.org Subject: Re: ntpdate on boot problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2011 22:03:50 -0000 On Sat Nov 5 11, 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. same here. simply add something like the following to your crontab: 0 10 * * */2 /etc/rc.d/ntpdate onestart cheers. alex > > Rob