Re: Replacing base NTP with ports NTP
On Sun, 31 Jan 2010 02:06:53 +1100 David Rawling articulated: > Greetings all and sundry > > 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). > > 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. > > 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. > > Can anyone point me in the direction of some documentation? > > Dave. From the /etc/defaults/rc.conf file: ntpdate_enable="NO" # Run ntpdate to sync time on boot (or NO). ntpdate_program="/usr/sbin/ntpdate" # path to ntpdate, if you want a different one. ntpdate_flags="-b" # Flags to ntpdate (if enabled). ntpdate_config="/etc/ntp.conf" # ntpdate(8) configuration file ntpdate_hosts=""# Whitespace-separated list of ntpdate(8) servers. ntpd_enable="NO"# Run ntpd Network Time Protocol (or NO). ntpd_program="/usr/sbin/ntpd" # path to ntpd, if you want a different one. ntpd_config="/etc/ntp.conf" # ntpd(8) configuration file ntpd_sync_on_start="NO" # Sync time on ntpd startup, even if offset is high ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift" # Flags to ntpd (if enabled). Enter the appropriate line(s) into your /etc/rc.conf file. DO NOT modify the /etc/defaults/rc.conf file. -- Jerry ges...@yahoo.com |=== |=== |=== |=== | You will soon meet a person who will play an important role in your life. signature.asc Description: PGP signature
Re: Replacing base NTP with ports NTP
On Saturday 30 January 2010, David Rawling 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 | | IT Consulting & Software Development| | Phone: +56 2 9790277 | http://coder.cl/ | signature.asc Description: This is a digitally signed message part.
Re: Replacing base NTP with ports NTP
On Sat, Jan 30, 2010 at 8:06 AM, David Rawling wrote: > 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). > > 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. > > 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. > > Can anyone point me in the direction of some documentation? David- I'm not going to claim that this is the "best" way either, but if you're doing source installs you could just set "WITHOUT_NTP=true" in /etc/src.conf to disable the installation of the system one. You can use "man src.conf" to find out more about this. I stop installations of a bunch of standard services this way -- lpr, bind, nis, sendmail, etc. "make delete-old" from your source build will clean up those files that are no longer used. Hope this helps, Ben ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Replacing base NTP with ports NTP
Greetings all and sundry 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). 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. 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. Can anyone point me in the direction of some documentation? Dave. -- David Rawling PD Consulting And Security Mob: +61 412 135 513 Email: d...@pdconsec.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"