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.

-- 

o--------------------------{ Will Maier }--------------------------o
| web:.......http://www.lfod.us/ | email.........willma...@ml1.net |
*---------------------[ BSD: Live Free or Die ]--------------------*

Reply via email to