On Tue, Mar 03, 2015 at 03:58:12PM +0000, Laszlo Papp wrote: > On Tue, Mar 3, 2015 at 3:54 PM, Denys Vlasenko <[email protected]> > wrote: > > On Tue, Mar 3, 2015 at 2:56 PM, Laszlo Papp <[email protected]> wrote: > >> On Mon, Mar 2, 2015 at 5:07 PM, Denys Vlasenko <[email protected]> > >> wrote: > >>> On Mon, Mar 2, 2015 at 10:39 AM, Laszlo Papp <[email protected]> wrote: > >>>> Either way, since I have spent a couple of hours before realizing it, > >>>> I think it would be beneficial to briefly extend documentation. It may > >>>> sound trivial for people familiar enough with "ntp", but for me it was > >>>> not. Usually, in networking, servers and clients are different things, > >>>> not rarely significantly. You can call me silly or any other way that > >>>> you like, but it would have helped me to have a few more words about > >>>> the usage of this option. > >>> > >>> Propose a change to ntpd --help > >> > >> Apparently you did that yourself: > >> > >> http://git.busybox.net/busybox/commit/?id=3aef814c0b08d9703280b4772060ce5016c683c4 > >> > >> I think there are still at least two issues in the peer documentation: > >> > >> -p PEER Obtain time from PEER (may be repeated) > >> If -p is not given, read /etc/ntp.conf > >> > >> 1) It does not mention that it aborts if the peer is unavailable, e.g. > >> unresolvable hostname. > >> 2) It does not mention what the format of /etc/ntp.conf is. It may be > >> obvious for you, but for me it is not. I assume it is some standard > >> format, but what is the standard? Any reference to it, etc? > > > > 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?
diff --git a/networking/ntpd.c b/networking/ntpd.c index 0247abb..46c39f2 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c @@ -55,10 +55,16 @@ //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" //usage: IF_FEATURE_NTPD_SERVER( +//usage: "\n unless ntpd is running as a server (-l)" //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: ) // -l and -p options are not compatible with "standard" ntpd: // it has them as "-l logfile" and "-p pidfile".
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
