xref: /freebsd-src/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
12b15cb3dSCy Schubert@node ntp-wait Invocation
22b15cb3dSCy Schubert@section Invoking ntp-wait
32b15cb3dSCy Schubert@pindex ntp-wait
42b15cb3dSCy Schubert@cindex Wait for ntpd to stabilize the system clock
52b15cb3dSCy Schubert@ignore
62b15cb3dSCy Schubert#
72b15cb3dSCy Schubert# EDIT THIS FILE WITH CAUTION  (invoke-ntp-wait.texi)
82b15cb3dSCy Schubert#
9*f5f40dd6SCy Schubert# It has been AutoGen-ed  May 25, 2024 at 12:05:38 AM by AutoGen 5.18.16
102b15cb3dSCy Schubert# From the definitions    ntp-wait-opts.def
112b15cb3dSCy Schubert# and the template file   agtexi-cmd.tpl
122b15cb3dSCy Schubert@end ignore
132b15cb3dSCy Schubert
142b15cb3dSCy Schubert
152b15cb3dSCy Schubert
162b15cb3dSCy Schubert@code{ntp-wait}
172b15cb3dSCy Schubertwill send at most
182b15cb3dSCy Schubert@kbd{num-tries}
192b15cb3dSCy Schubertqueries to
202b15cb3dSCy Schubert@code{ntpd(8)},
212b15cb3dSCy Schubertsleeping for
222b15cb3dSCy Schubert@kbd{secs-between-tries}
232b15cb3dSCy Schubertafter each status return that says
242b15cb3dSCy Schubert@code{ntpd(8)}
252b15cb3dSCy Schuberthas not yet produced a synchronized and stable system clock.
262b15cb3dSCy Schubert
272b15cb3dSCy Schubert@code{ntp-wait}
282b15cb3dSCy Schubertwill do this quietly, unless the
292b15cb3dSCy Schubert@code{-v}
302b15cb3dSCy Schubertflag is provided.
312b15cb3dSCy SchubertThis can be useful at boot time, to delay the boot sequence until after
322b15cb3dSCy Schubert@kbd{ntpd} @kbd{-g}
332b15cb3dSCy Schuberthas set the time.
342b15cb3dSCy Schubert
352b15cb3dSCy SchubertThis section was generated by @strong{AutoGen},
362b15cb3dSCy Schubertusing the @code{agtexi-cmd} template and the option descriptions for the @code{ntp-wait} program.
372b15cb3dSCy Schubert
382b15cb3dSCy Schubert@menu
392b15cb3dSCy Schubert* ntp-wait usage::                  ntp-wait help/usage (@option{--help})
402b15cb3dSCy Schubert* ntp-wait tries::                  tries option (-n)
412b15cb3dSCy Schubert* ntp-wait sleep::                  sleep option (-s)
422b15cb3dSCy Schubert* ntp-wait verbose::                verbose option (-v)
432b15cb3dSCy Schubert* ntp-wait exit status::            exit status
442b15cb3dSCy Schubert* ntp-wait Authors::                Authors
452b15cb3dSCy Schubert* ntp-wait Notes::                  Notes
462b15cb3dSCy Schubert@end menu
472b15cb3dSCy Schubert
482b15cb3dSCy Schubert@node ntp-wait usage
492b15cb3dSCy Schubert@subsection ntp-wait help/usage (@option{--help})
502b15cb3dSCy Schubert@cindex ntp-wait help
512b15cb3dSCy Schubert
522b15cb3dSCy SchubertThis is the automatically generated usage text for ntp-wait.
532b15cb3dSCy Schubert
542b15cb3dSCy SchubertThe text printed is the same whether selected with the @code{help} option
552b15cb3dSCy Schubert(@option{--help}) or the @code{more-help} option (@option{--more-help}).  @code{more-help} will print
562b15cb3dSCy Schubertthe usage text by passing it through a pager program.
572b15cb3dSCy Schubert@code{more-help} is disabled on platforms without a working
582b15cb3dSCy Schubert@code{fork(2)} function.  The @code{PAGER} environment variable is
592b15cb3dSCy Schubertused to select the program, defaulting to @file{more}.  Both will exit
602b15cb3dSCy Schubertwith a status code of 0.
612b15cb3dSCy Schubert
622b15cb3dSCy Schubert@exampleindent 0
632b15cb3dSCy Schubert@example
64*f5f40dd6SCy Schubertntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p18
652b15cb3dSCy SchubertUSAGE: ntp-wait [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
662b15cb3dSCy Schubert
672b15cb3dSCy Schubert    -n, --tries=num              Number of times to check ntpd
682b15cb3dSCy Schubert    -s, --sleep=num              How long to sleep between tries
692b15cb3dSCy Schubert    -v, --verbose                Be verbose
702b15cb3dSCy Schubert    -?, --help                   Display usage information and exit
712b15cb3dSCy Schubert        --more-help              Pass the extended usage text through a pager
722b15cb3dSCy Schubert
732b15cb3dSCy SchubertOptions are specified by doubled hyphens and their name or by a single
742b15cb3dSCy Schuberthyphen and the flag character.
752b15cb3dSCy Schubert@end example
762b15cb3dSCy Schubert@exampleindent 4
772b15cb3dSCy Schubert
782b15cb3dSCy Schubert@node ntp-wait tries
792b15cb3dSCy Schubert@subsection tries option (-n)
802b15cb3dSCy Schubert@cindex ntp-wait-tries
812b15cb3dSCy Schubert
822b15cb3dSCy SchubertThis is the ``number of times to check ntpd'' option.
832b15cb3dSCy SchubertThis option takes a number argument.
842b15cb3dSCy Schubert        The maximum number of times we will check @code{ntpd} to see if
852b15cb3dSCy Schubert        it has been able to synchronize and stabilize the system clock.
862b15cb3dSCy Schubert@node ntp-wait sleep
872b15cb3dSCy Schubert@subsection sleep option (-s)
882b15cb3dSCy Schubert@cindex ntp-wait-sleep
892b15cb3dSCy Schubert
902b15cb3dSCy SchubertThis is the ``how long to sleep between tries'' option.
912b15cb3dSCy SchubertThis option takes a number argument @file{secs-between-tries}.
922b15cb3dSCy Schubert        We will sleep for @file{secs-between-tries} after each query
932b15cb3dSCy Schubert        of @code{ntpd} that returns "the time is not yet stable".
942b15cb3dSCy Schubert@node ntp-wait verbose
952b15cb3dSCy Schubert@subsection verbose option (-v)
962b15cb3dSCy Schubert@cindex ntp-wait-verbose
972b15cb3dSCy Schubert
982b15cb3dSCy SchubertThis is the ``be verbose'' option.
992b15cb3dSCy Schubert        By default, @code{ntp-wait} is silent.
1002b15cb3dSCy Schubert        With this option, @code{ntp-wait} will provide status information.
1012b15cb3dSCy Schubert@node ntp-wait exit status
1022b15cb3dSCy Schubert@subsection ntp-wait exit status
1032b15cb3dSCy Schubert
1042b15cb3dSCy SchubertOne of the following exit values will be returned:
1052b15cb3dSCy Schubert@table @samp
1062b15cb3dSCy Schubert@item 0 (EXIT_SUCCESS)
1072b15cb3dSCy SchubertSuccessful program execution.
1082b15cb3dSCy Schubert@item 1 (EXIT_FAILURE)
1092b15cb3dSCy SchubertThe operation failed or the command syntax was not valid.
1102b15cb3dSCy Schubert@end table
1112b15cb3dSCy Schubert@node ntp-wait Authors
1122b15cb3dSCy Schubert@subsection ntp-wait Authors
1132b15cb3dSCy Schubert@node ntp-wait Notes
1142b15cb3dSCy Schubert@subsection ntp-wait Notes
115