Replacing base NTP with ports NTP

Daniel Molina Wegener dmw at coder.cl
Sat Jan 30 15:30:45 UTC 2010


On Saturday 30 January 2010,
David Rawling <djr at pdconsec.net> wrote:

> Greetings all and sundry

  Hello David,

> 
> About 3 months ago I built myself a time server using 8.0-RC3, IIRC, and
> I upgraded to 8.0-RELEASE (and now -p2). Naturally, as I want this
> server to provide time services, I've installed the net/ntp port, among
> others.
> 
> Recently, for reasons that have become lost in the mists of time, I
> noticed that I wasn't running the port version of NTP
> (/usr/local/sbin/ntpd), but the version installed with the base system
> (/usr/sbin/ntpd).

  OK, rc.conf(5) does the trick.

  Look here for an overview of rc.conf:
  http://www.freebsd.org/doc/handbook/configtuning-rcd.html

  And try the next command to gather information about rc.conf(5):
  man 5 rc.conf

  Possibly you are looking for the /ntpd_program/ variable (from the
manual page):
-----8<----------8<----------8<-----
ntpd_program
		 (str) Path to ntpd(8) (default /usr/sbin/ntpd).
-----8<----------8<----------8<-----

> 
> For the immediate term, I've renamed the base versions of the files in
> /usr/sbin, and then symlinked to the port version (in /usr/local) - ntpd
> is now the ports version, as are most of the tools. This does, however,
> seem like a rather silly way of getting the most current NTPd running.

  Bad practice... ;)

> 
> I cannot, for the life of me, figure out how to get the Ports version of
> NTP to overwrite the base system's NTP. Yet I'm sure (since there *is* a
> port of NTP) there must be a better way to do this.

  No problem, just try the configuration above. Also, you do not need
to restart the complete system, just proceed as follows:

1. As root stop ntpd:
  # /etc/rc.d/ntpd stop

2. Edit the /etc/rc.conf file...

3. Start ntpd:
  # /etc/rc.d/ntpd start

> 
> Can anyone point me in the direction of some documentation?
> 
> Dave.
> 

Best regards,
-- 
| Daniel Molina <dmw [at] coder [dot] cl> |
| IT Consulting & Software Development    |
| Phone: +56 2 9790277 | http://coder.cl/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100130/fa7bdc2e/attachment.pgp


More information about the freebsd-questions mailing list