FreeBSD Bugzilla – Attachment 185920 Details for
Bug 199127
rc.d/ntpd: user-set ntpd_flags stomps over rc-defined ones (pidfile, driftfile)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Use command_args not rc_flags to avoid rc.conf messing up configuration
ntpd_flags.diff (text/plain), 1.38 KB, created by
Chris Rees
on 2017-08-30 13:02:50 UTC
(
hide
)
Description:
Use command_args not rc_flags to avoid rc.conf messing up configuration
Filename:
MIME Type:
Creator:
Chris Rees
Created:
2017-08-30 13:02:50 UTC
Size:
1.38 KB
patch
obsolete
>Index: defaults/rc.conf >=================================================================== >--- defaults/rc.conf (revision 323018) >+++ defaults/rc.conf (working copy) >@@ -370,8 +370,6 @@ > 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). > ntp_src_leapfile="/etc/ntp/leap-seconds" > # Initial source for ntpd leapfile > ntp_db_leapfile="/var/db/ntpd.leap-seconds.list" >Index: rc.d/ntpd >=================================================================== >--- rc.d/ntpd (revision 323018) >+++ rc.d/ntpd (working copy) >@@ -23,10 +23,10 @@ > > ntpd_precmd() > { >- rc_flags="-c ${ntpd_config} ${ntpd_flags}" >+ command_args="-c $ntpd_config -p $pidfile -f /var/db/ntpd.drift" > > if checkyesno ntpd_sync_on_start; then >- rc_flags="-g $rc_flags" >+ command_args="-g $command_args" > fi > > ntpd_init_leapfile >@@ -55,9 +55,7 @@ > ln -fs "${ntpd_chrootdir}/var/db/ntp.drift" /var/db/ntp.drift > ln -fs "${ntpd_chrootdir}${ntp_tmp_leapfile}" ${ntp_tmp_leapfile} > >- # Change run_rc_commands()'s internal copy of $ntpd_flags >- # >- rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags" >+ command_args="-u ntpd:ntpd -i $ntpd_chrootdir $command_args" > } > > current_ntp_ts() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 199127
: 185920