On Tue, Mar 18, 2014 at 1:52 PM, Harald Becker <ra...@gmx.de> wrote: > Hi Laszlo ! > >>That is not much of a difficulty today. Systemd can probably do >>this for one. > > Not everybody like to use systemd ... I hate it and will NEVER > use it on a system of mine!
Yes, it is possible to do it without systemd, although pretty much everyone seems to be switching across, really, even Ubuntu itself. >>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). > > ... but the running daemon need to know when to read the file. > > Reading info only on startup makes not much sense in your term, a > script may read the config and put it in command line. Done, and > so simple. > > ... in any other case there need to be code to tell the daemon > the right time to (re)read the config and (re)configure it's > behavior, which is much more difficult than just a few lines of > reading a file. Have you ever done this? Yes, along with many people. I have no idea why you would like to make it so complex. The config file is sourced on start, which is not equal to system start up, which you may be confusing it with. Start means when you start the daemon, including restart. Your assumption would make it complex, but that was not suggested. >>It is not a good intention to keep things small just for the >>sake of being small. > > One of the primary goals of Busybox was, to have a SMALL code > space for systems with less resources. IMO for this it's > important to ask before adding extra code ... and it's more than > just a few lines of reading a file (see above). It is not. It is literally a few lines. If you want small code, do not write anything, and you are done. :) I can just reiterate my opinion here, if something is common (like specifying the peer), it makes sense to add a few lines which is probably (much) less than 5% of the code. But if it is such a big concern, it could be made a built time decision, yeah. > > >>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. > > Put NTP peer address in a config file, let your init script pick > this file and put it in command line. What's wrong with this? Hmm, you do not seem to have understood the issue. Currently, Yocto will do it differently, so will Buildroot, OpenWrt, and what not. This is not nice. > Average user just needs to know how to put peer address in a > file. Why do we need to blow up an otherwise small daemon with > this config file handling stuff? ... just to configure a single > peer name? Again, I have no idea why you think reading 1-2 variables from a file is a "Why do we need to blow up an otherwise small daemon with this config file handling stuff?" situation. Please be considerate to the use cases, not pre-mature optimization. _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox