From owner-freebsd-questions@FreeBSD.ORG Sat Nov 5 22:55:35 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ABC81065674 for ; Sat, 5 Nov 2011 22:55:35 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id DFDCC8FC0C for ; Sat, 5 Nov 2011 22:55:34 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id pA5MtYm5028857; Sat, 5 Nov 2011 16:55:34 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id pA5MtYaw028854; Sat, 5 Nov 2011 16:55:34 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sat, 5 Nov 2011 16:55:34 -0600 (MDT) From: Warren Block To: Robert Simmons In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Sat, 05 Nov 2011 16:55:34 -0600 (MDT) 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:55:35 -0000 On Sat, 5 Nov 2011, 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. Yes, it is. FreeBSD 8-STABLE and 9 have /etc/rc.d/netwait just for this.