Thank you for taking the time to report this bug and helping to make Ubuntu better. I appreciate the quality of this bug report and I'm sure it'll be helpful to others experiencing the same issue.
This sounds like an upstream bug to me. The best route to getting it fixed in Ubuntu in this case would be to file an upstream bug if you're able to do that. Otherwise, I'm not sure what we can do directly in Ubuntu to fix the problem without gaining too much of a maintenance burden. I'd ask you if you as original reporter could file that upstream bug (https://bugs.ntp.org/index.cgi). If you do end up filing an upstream bug, please link to it from here. Thanks! ** Tags added: needs-upstream-report -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to ntp in Ubuntu. https://bugs.launchpad.net/bugs/1773007 Title: sntp return code is not EXIT_FAILURE when hostname query is not successful Status in ntp package in Ubuntu: Confirmed Bug description: # sntp abc sntp 4.2.8p10@1.3728-o (1) kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such file or directory abc lookup error Temporary failure in name resolution echo $? 0 from the manpage for sntp: EXIT STATUS One of the following exit values will be returned: 0 (EXIT_SUCCESS) Successful program execution. 1 (EXIT_FAILURE) The operation failed or the command syntax was not valid. 66 (EX_NOINPUT) A specified configuration file could not be loaded. 70 (EX_SOFTWARE) libopts had an internal operational error. Please report it to auto‐ gen-us...@lists.sourceforge.net. Thank you. ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: sntp 1:4.2.8p10+dfsg-5ubuntu7 ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17 Uname: Linux 4.15.0-20-generic x86_64 ApportVersion: 2.20.9-0ubuntu7 Architecture: amd64 Date: Wed May 23 19:53:29 2018 ProcEnviron: TERM=xterm-256color PATH=(custom, no user) LANG=en_US.UTF-8 SHELL=/bin/bash SourcePackage: ntp UpgradeStatus: No upgrade log present (probably fresh install) modified.conffile..etc.ntp.conf: [modified] mtime.conffile..etc.ntp.conf: 2018-05-23T19:24:22.724839 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1773007/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp