Something I've just noticed about this commit:
On 20/07/2018 16:59, Ian Lepore wrote: > Author: ian > Date: Fri Jul 20 13:59:29 2018 > New Revision: 336547 > URL: https://svnweb.freebsd.org/changeset/base/336547 > > Log: > Automatically run ntpd as non-root when possible. [snip] > +ntpd_precmd() > +{ > + local driftopt > + > + # If we can run as a non-root user, switch uid to ntpd and use the > + # new default location for the driftfile inside the ntpd-owned dir. > + # Otherwise, figure out what to do about the driftfile option. If set > + # by the admin, we don't add the option. If the file exists in the old > + # default location we use that, else we use the new default location. > + if can_run_nonroot; then > + _user="ntpd" > + driftopt="-f ${_ntp_default_driftfile}" > + elif [ -z "${rc_flags##*-f*}" ] || > + [ -z "${rc_flags##*--driftfile*}" ] || It seems that the two checks above produce a false positive if rc_flags is empty already. And that's the case on a system that I recently brought up (very recent CURRENT via source install). /etc/defaults/rc.conf has ntpd_flags="". As a result ntpd is started without the drift file option. And the stock /etc/ntp.conf also does not have the directive. > + grep -q "^[ \t]*driftfile" "${ntpd_config}"; then > + driftopt="" # admin set the option, we don't need to add it. > + elif [ -f "${_ntp_old_driftfile}" ]; then > + driftopt="-f ${_ntp_old_driftfile}" > + else > + driftopt="-f ${_ntp_default_driftfile}" > fi -- Andriy Gapon _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"