From 2ba7d35b21d1269e9ba4a789832c0b0174eccf86 Mon Sep 17 00:00:00 2001 From: Giorgos Keramidas Date: Tue, 27 Jan 2009 20:13:24 +0000 Subject: [PATCH] When synchronizing the clock at system startup time, use both the -g and -q options. They do a slightly different thing and both are necessary when the time difference is large. Noticed by: danger, in the forums Approved by: roberto MFC after: 1 week --- etc/rc.d/ntpd | 2 +- share/man/man5/rc.conf.5 | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/etc/rc.d/ntpd b/etc/rc.d/ntpd index 7a4eef82c669..3e7a8c056f18 100755 --- a/etc/rc.d/ntpd +++ b/etc/rc.d/ntpd @@ -23,7 +23,7 @@ ntpd_precmd() rc_flags="-c ${ntpd_config} ${ntpd_flags}" if checkyesno ntpd_sync_on_start; then - rc_flags="-g $rc_flags" + rc_flags="-q -g $rc_flags" fi if [ -z "$ntpd_chrootdir" ]; then diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 593a3587d4f7..d12917830bb3 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -2065,12 +2065,16 @@ If set to .Xr ntpd 8 is run with the .Fl g -flag, which syncs the system's clock on startup. +and +.Fl q +flags, which syncs the system's clock on startup. See .Xr ntpd 8 for more information regarding the .Fl g -option. +and +.Fl q +options. This is a preferred alternative to using .Xr ntpdate 8 or specifying the