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. >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. >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. >... 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. -- Harald _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox