There is/was a bug in the ntpdate implementation that set the clock
to a completely bogus value. So I’ve since written a simple script that
cron to fetch the time from a near NTP server.
You can find several download methods on the ntpsec website.
As of 2017-07-29, the is no port for ntpsec yet. So on FreeBSD you have to compile it yourself. Fortunately, this is not difficult.
You will need Python to build
ntpsec. Additionally, many of the helper
programs are written in Python. In this article, I’ll be using Python 3.6.
asciidoc program and the DocBook style sheets are needed to build the documentation.
Building the software
To build the software, I downloaded the source distribution from the FTP site. Cloning the repo from gitlab also worked.
Downloading a tarball from gitlab or github would complain about a missing
.autorevision-cache file during the build.
> python3 waf configure --prefix=/usr/local --python=/usr/local/bin/python3 > python3 waf build > cd build/main/ntpclients/ > sed -i '' -e 's/env python/env python3/' ntp* > cd - # python3 waf install
sed command is necessary because the scripts call python, not python3.
/etc/rc.d/ntpd seems to work well, provided I set the
following in my
ntpd_enable="YES" ntpd_program="/usr/local/sbin/ntpd" ntpd_sync_on_start="YES"
For comments, please send me an e-mail.
- From python script to executable with cython
- On Python speed
- Python 3.11 speed comparison with 3.9
- Getting the first or last item from a dictview without a list
- Python & standard output redirection on ms-windows