(Ab)using rcng's features to keep rc.d-style services running should they fail.

Wesley Shields wxs at FreeBSD.org
Mon Oct 5 14:16:41 UTC 2009

On Sun, Oct 04, 2009 at 12:30:55PM -0700, Doug Barton wrote:
> Alex Trull wrote:
> > Hi all,
> > 
> > I realised that because portupgrade/portmaster don't always 
> > cleanly restart processes that have died due to being 
> > upgraded (mysqld, often!) that this was something I wanted 
> > to fix.
> I can't speak to portupgrade, however for portmaster there is no such
> facility whatsoever. The admin is expected to disable things prior to
> an upgrade and re-enable them when the upgrade is done. I don't feel
> that this is an overwhelming burden. :)

There is the @stopdaemon directive in plists (which gets translated into
@unexec to forcestop the script). Some ports use it and some do not.
Personally I think ports doing this automatically are quite annoying,
and would love to rip them all out from the ports. Something like
portmaster growing support for it would be welcome provided it does not
happen by default.

I've always found it funny that there is no @startdaemon directive
(rightfully so, as we want people to explicitly turn things on) but it's
acceptable if things get turned off via @stopdaemon without explicit
permission. If a particular upgrade requires that the thing be not
running we should check for that and abort, not go shutting things down.

-- WXS

More information about the freebsd-hackers mailing list