Hi Andreas, On Tue, Mar 18, 2014 at 8:41 PM, Andreas Oberritter <[email protected]> wrote: > On 18.03.2014 21:11, Laszlo Papp wrote: >> On Tue, Mar 18, 2014 at 7:59 PM, Xabier Oneca -- xOneca >> <[email protected]> wrote: >>> Usually scripts in /etc/init.d use /etc/default/* as config values >>> (some distros, even using them as main config files). The scripts that >>> Laszlo posted fit that pattern. >> >> Not quite; actually "/etc/default" is more like a Debian, et al, >> pattern. OpenWrt will use something. Yocto uses something else, etc. >> And for what it is worth, buildroot is also strange with >> "/etc/default/ntpd" without any busybox indication. > > Speaking of Yocto, our Yocto-based firmware contains 9 config files by > default in /etc/default, one of which is /etc/default/busybox-syslog.
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/busybox/busybox.inc#n24 It is the last fallback, but note that Yocto is not a distribution, but distribution generator, so it has to support a wide variety of things. That being said, it is only the syslog applet, and only as the "last" position in the order. You will not necessarily find the same for others. It is nice from them they do this, but it is not how these things are put in general. Check the aforementioned file further on for details. > The latter may have disappeared in more recent versions of Yocto, but > anyway, I just want to show you that /etc/default isn't used by Debian only. No, it has not disappeared. It has been like that for a while. OpenWrt will use something else, and buildroot does not even bother to indicate busybox in the name! > Actually, it isn't important which location you use for these files. As > long as you use a simple KEY=VALUE format, you can use them in > shell-based initscripts, systemd and upstart, at least. > Regarding the script you posted, I'd remove the export statement from > the config file to make it look less like a shell script (and to match > the format above). Yes, I agree. It was used so that I could test it quickly from shell, too. I should probably add come comment into the config file, however. _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
