Daemon configuration for OpenCSW packages
Coming up with a standard for daemon configuration can be challenging, because there are multiple issues to deal with:
- Boot time automated start up
- Configuration files
Boot time automated startup
For any kind of boot-time demon, you should write a standard style rc script, and put it in
This is true, reguardless of whether you wish to support old-style (sol9) boot syntax, or new SMF style, or both.
Note that the cswinitsmf class util docs specify that, even if you are using our nice standard methods, you should provide a template startup script in that location.
If for some reason, you choose to only support old style init (but these days, there's really no excuse not to use cswinitsmf!), you should still provide your original init script in that location. You should also have the package symlink /etc/init.d/cswXXXX -> /opt/csw/etc/init.d/cswXXXX.
It will then be up to you at postinstall time to decide whether to do the boot-time symlinking from /etc/rc.X.d/S##….. to /etc/init.d — not forgetting, of course, to respect the csw.conf settings of autoenable_daemon=yes/no, if applicable.
Really, its easier to just use cswinitsmf!
Note for NFS-shared (or otherwise copied) /opt/csw
- At some point in the future, ideally, there will be an official cswinitsmf companion utility, that you could call on each desired local machine you wish to enable the demon to start at boot time on. But it should be easy enough for you to create the appropriate symlink manually, for now.
That being said, we recommend that any machine running demons, run them locally, not over NFS.
Both the standard demon config files, and related init scripts, could both be considered "config files".
Since init scripts are probably written "by us", they should be written to respect BOTH local, and global, configs.
If you support boot-time options for the init script, you should look first in /etc/opt/csw, but if not present, you should then ALSO check /opt/csw/etc to see if a global defaults file has been provided.
In this way, we make it easier for people to support large scale farms of replicated /opt/csw
For direct demon-read config files, please do your best to make the config files compliant with the replicated /opt/csw page mentioned above.