Will Maier, 06/09/09 22:33:
On Tue, Jun 09, 2009 at 02:06:59PM -0400, (private) HKS wrote:
The much larger problem, though, is with starting/stopping/restarting
services. Say I add spamd as an enabled service on host1. For my
scripts to start it properly, I have to replicate the code already in
/etc/rc defining how spamd starts. This is prone to errors and runs
the risk of breaking on upgrades. Restarting services that need more
than a HUP is also a chore. As for stopping, some services like
postgresql need some careful attention. This means replicating code
from /etc/rc.shutdown.
You can make this easier in rc.local by using a construct along the
lines described here:
http://erdelynet.com/tech/openbsd/rclocal-trick/
I've looked at adding some stupid delimiters to /etc/rc,
/etc/rc.local, and /etc/rc.shutdown so I can just pull in the
necessary chunks, but I'm wondering if there's anything available
that's more elegant and won't break on every upgrade.
It sounds like using rc.d would be better suited to your
environment. FreeBSD and NetBSD both use rcorder(8), which runs well
on OpenBSD. Hook that into your rc.local and write/manage init
scripts under /etc/rc.d.
Well, years i used, NetBSD and their rc.d scripts are quite usefull...
Is there any specific reason why OpenBSD does not place startup scripts
under rc.d? As long as administrator does not insert ie; service=YES
flag into rc.conf, service not activated.
Regards,
Cem