Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Jul 2006 10:38:32 +0200
From:      Erik Norgaard <norgaard@locolomo.org>
To:        Jonathan Horne <jhorne@dfwlp.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: setting ntp-servers for ntpdate via dhcp
Message-ID:  <44A8D788.5040004@locolomo.org>
In-Reply-To: <200607021602.13458.jhorne@dfwlp.com>
References:  <44A8315F.3090600@locolomo.org> <200607021602.13458.jhorne@dfwlp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44A8D788.5040004>