From owner-freebsd-questions@FreeBSD.ORG Mon Jul 3 09:10:37 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EAB7116A7AD for ; Mon, 3 Jul 2006 09:10:37 +0000 (UTC) (envelope-from norgaard@locolomo.org) Received: from strange.daemonsecurity.com (59.Red-81-33-11.staticIP.rima-tde.net [81.33.11.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22A3243E75 for ; Mon, 3 Jul 2006 08:38:39 +0000 (GMT) (envelope-from norgaard@locolomo.org) Received: from [192.168.7.193] (68.Red-80-34-55.staticIP.rima-tde.net [80.34.55.68]) by strange.daemonsecurity.com (Postfix) with ESMTP id F21372E021; Mon, 3 Jul 2006 10:38:37 +0200 (CEST) Message-ID: <44A8D788.5040004@locolomo.org> Date: Mon, 03 Jul 2006 10:38:32 +0200 From: Erik Norgaard User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Jonathan Horne References: <44A8315F.3090600@locolomo.org> <200607021602.13458.jhorne@dfwlp.com> In-Reply-To: <200607021602.13458.jhorne@dfwlp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: setting ntp-servers for ntpdate via dhcp 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: Mon, 03 Jul 2006 09:10:38 -0000 Jonathan Horne wrote: > On Sunday 02 July 2006 15:49, Erik Nørgaard wrote: >> There is a dhcp-option, ntp-servers, to set which ntp-server to use. It >> would be quite useful with ntpdate. Does anyone have a patch to ntpdate >> startup script or other hack that use this option? - just before I start >> hacking myself... > > my ntp options in /etc/rc.conf look like this: > > ntpdate_enable="YES" > ntpdate_hosts="us.pool.ntp.org" > ntpd_enable="YES" > > when my system boots, ntpdate forces the time to syncronize (no matter how far > off it is), and then ntp takes over from there. I have that too, the point is not that ntpdate doesn't work, but that configuration via dhcp is not supported. And since dhcp provides the option, it would be quite neat to support it. So something like this in rc.conf would be nice: ntpdate_enable="DHCP" ntpdate_hosts="ntp.domain.tld" When set to DHCP the ntpdate script should parse the lease file to find any available ntp server to use. The hosts option should be fallback if the dhcp server did not provide a list of available ntp-servers. Currently such functionality is not supported, and just before I go ahead and hack something up, it would be nice to know if others have done the effort. Cheers, Erik