From: Harlan Stenn Date: Fri, 23 Jan 2015 10:16:23 +0000 (+0000) Subject: [Bug 2617] Fix sntp Usage documentation section X-Git-Tag: NTP_4_2_8P1_RC1~5^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3aab5a4e0f1703a5f08842c430a22669504b9c81;p=thirdparty%2Fntp.git [Bug 2617] Fix sntp Usage documentation section bk: 54c21f77HdyRcIpTSsqG5Ano7K3_jA --- diff --git a/ChangeLog b/ChangeLog index f7b394557..a11544298 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ --- + +* [Bug 2617] Fix sntp Usage documentation section. +--- (4.2.8p1-beta5) 2015/01/07 Released by Harlan Stenn * [Bug 2728] Work around C99-style structure initialization code diff --git a/sntp/sntp-opts.def b/sntp/sntp-opts.def index c32f5e51e..c94d5e96e 100644 --- a/sntp/sntp-opts.def +++ b/sntp/sntp-opts.def @@ -157,7 +157,9 @@ flag = { doc = <<- _EndOfDoc_ If the time adjustment is less than @file{steplimit} milliseconds, slew the amount using @command{adjtime(2)}. Otherwise, step the - correction using @command{settimeofday(2)}. + correction using @command{settimeofday(2)}. The default value is 0, + which means all adjustments will be stepped. This is a feature, as + different situations demand different values. _EndOfDoc_; }; @@ -292,14 +294,27 @@ doc-section = { is the simplest use of this program and can be run as an unprivileged command to check the current time and error in the local clock. -.It Li "sntp -a ntpserver.somewhere" +.It Li "sntp -Ss -M 128 ntpserver.somewhere" With suitable privilege, run as a command or from a .Xr cron 8 job, -.Ic "sntp -a" -will reset the local clock from a synchronized specified server, +.Ic "sntp -Ss -M 128 ntpserver.somewhere" +will request the time from the server, +and if that server reports that it is synchronized +then if the offset adjustment is less than 128 milliseconds +the correction will be slewed, +and if the correction is more than 128 milliseconds +the correction will be stepped. +.It Li "sntp -S ntpserver.somewhere" +With suitable privilege, +run as a command +or from a +.Xr cron 8 +job, +.Ic "sntp -S ntpserver.somewhere" +will set (step) the local clock from a synchronized specified server, like the (deprecated) .Xr ntpdate 1ntpdatemdoc , or