#1137430 ntpsec: ntpwait always fails when "-n 1" is specified

Package:
ntpsec
Source:
ntpsec
Description:
Network Time Protocol daemon and utility programs
Submitter:
Aaron Bugher
Date:
2026-05-23 18:55:01 UTC
Severity:
normal
#1137430#5
Date:
2026-05-23 18:44:54 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

`man ntpwait` says "-n" means "Number of times to check ntpd."  I read that to mean that specifying "-n 1" should check one time and either immediately succeed or give up.  Instead, ntpwait returns 1, indicating, "The operation failed or the command syntax was not valid."

Example:


ansible@neuron-mail:~$ # This succeeds immediately:
ansible@neuron-mail:~$ ntpwait
ansible@neuron-mail:~$ echo $?
0
ansible@neuron-mail:~$ # This fails:
ansible@neuron-mail:~$ ntpwait -n 1
ansible@neuron-mail:~$ echo $?
1
ansible@neuron-mail:~$ # Verbose gives inaccurate explanation:
ansible@neuron-mail:~$ ntpwait -n 1 -v
Waiting for ntpd to synchronize... No!
ntpd did not synchronize.
ansible@neuron-mail:~$ echo $?
1
ansible@neuron-mail:~$ # Other numbers seem OK:
ansible@neuron-mail:~$ ntpwait -n 2 -v
Waiting for ntpd to synchronize... OK! (0.0 seconds)
ansible@neuron-mail:~$ echo $?
0
ansible@neuron-mail:~$