ntpd daemon

Denys Vlasenko vda.linux at googlemail.com
Thu Mar 5 12:57:19 UTC 2015


On Tue, Mar 3, 2015 at 5:48 PM, Isaac Dunham <ibid.ag at gmail.com> wrote:
>> > It's "standard" ntpd compat. google "man ntp.conf"
>>
>> I know, but that is not the point I am trying to make. Reading the
>> help output without investigating about the code, it is unclear for
>> the user what format the file has. It can be "standard", it can be
>> busybox specific, etc.
>>
>> Also, do not forget about the other point. That is also important and
>> well-hidden.
>
> How is this patch for clarifying the documentation?

 //usage:    IF_FEATURE_NTPD_CONF(
 //usage:     "\n        If -p is not given, read /etc/ntp.conf"
 //usage:    )
+//usage:     "\n        If no peer is defined, ntpd will not run"

Most network tools do the same. wget, ping...

 //usage:    IF_FEATURE_NTPD_SERVER(
+//usage:     "\n        unless ntpd is running as a server (-l)"

This is obvious: why would "ntpd -l" without -p not work?
That'll be a standalone server, very useful for a rover swarm
on Mars. ;)

If in doubt, user can discover the behavior with a trivial experiment.

 //usage:     "\n    -l    Also run as server on port 123"
 //usage:     "\n    -I IFACE Bind server to IFACE, implies -l"
 //usage:    )
+//usage:    IF_FEATURE_NTPD_CONF(
+//usage:     "\nBusybox ntpd reads a subset of standard /etc/ntp.conf:"
+//usage:     "\nlines of the form\nserver PEER\nsepecify peers."
+//usage:    )

Okay. I'm going to say it this way:

//usage:     "\n                If -p is not given, 'server HOST' lines"
//usage:     "\n                from /etc/ntp.conf are used"


More information about the busybox mailing list