On Tue, Mar 18, 2014 at 1:24 PM, Harald Becker <[email protected]> wrote:
> Hi Laszlo !
>
>>The idea is that I have an application on the embedded system
>>where the user can configure the ntp peer. The application would
>>then re-run and also enable the ntp daemon from busybox if it is
>>not yet done so.
>
> All that is not part of Busybox. So you are free to put this to
> your distro.

The point of the thread is to avoid people putting the same into their
own projects. Note that neither Yocto, nor buildroot is a
distribution, however.

>>I think the standard way to do it would be to use initscripts
>>(sysv or systemd). It is not a problem to run busybox's ntpd
>>with the right command line parameters on the fly, but
>>automatically on boot, it is getting a bit more important if you
>>know what I mean.
>
> The only difficulty at boot time I know is the order of startup.
> ntpd may only be activated when network is up.

That is not much of a difficulty today. Systemd can probably do this for one.

>>It would be basically consistent with several other applets,
>>namely:
>
> But all those applets do need more configuration. ntpd needs so
> less info, all can be given on command line. And if there is a
> config file feature, next cry will be, how to reload config when
> things change? So either you need to watch modification time of
> config file or handle any signals ... much code to handle this
> all. So do we really need a configuration file option for ntpd
> just to select the peer? It's so easy to put this in init
> scripts, to stop and restart ntpd.

The main concern is not whether or not it is easy. It could be easy
the same way to put it into the source code. The problem is that
people keep reinventing the same in different projects. That is a sign
of something not going well in my opinion. I am not sure what much
code you are speaking of. Reading a simple config file in should be
the matter of few lines (in C, at least).

>>... etc. As for Zoltan, yes, I understood, and that is why I also
>>mentioned he would be doing it in buildroot, which is somewhat
>>similar to Yocto, but not quite. :) The point is that ntpd could
>>be run from initscripts with a config file dedicated for it, but
>>perhaps there are better solutions for this out there?
>
> Sorry, I'm not sure, if I'm able to follow your intention.
>
> My intention is to keep things small, so if you are going to add
> config file support for ntpd, make it at least a build time
> configurable option (as I think syslogd did). So things won't
> change or add any extra code, when you do not enable ntpd config
> file support. This is my personal opinion, so lets here what
> others mean.

It is not a good intention to keep things small just for the sake of
being small. Currently, I believe most of the cases will be when ntpd
is run as a daemon and not a one-shot process. You could hard code a
default value, but yet, the end users would like to configure it via
some easy configurable means, not messing with init script internals,
etc, IMHO.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to