rc.subr extensions

Volker Stolz stolz at i2.informatik.rwth-aachen.de
Wed Nov 10 11:41:14 GMT 2004


Am 10. Nov 2004 um 12:06 CET schrieb Alexander at Leidinger.net:
> > Excellent! While we discussed this at the ports BOF at EuroBSDCon, it
> > was suggested to have a knob for deciding whether to run
> > "${RC_SCRIPT} restart" on updating a port -- it has to be configurable
> > since the administrator might want fine-grained control. Any chance of
> > adding this as sugar on top?
> 
> Do we really want to do that? Personally I agree with "stop" before the
> deinstall (in some cases...), but not with a "restart". I may want to
> make changes of the configuration in between, or I need to make changes
> because the application has an incompatible change in the configuration
> between versions. Ideally the administrator knows best what to do at an
> update, so he should explicitly start, stop or restart a service.

Yes, 'make restart' won't work in all cases, so we should settle for
  [stop] -> deinstall -> reinstall -> [start]
[Or hand in one of your pointy hats for devising a mechanism to tell by
OLD_PORTVERSION vs. NEW_PORTVERSION whether restarting or reconfiguring
is required]

Back to the features -- for control, I suggest two knobs:
RC_RESTART and ${PORTNAME}_RC_RESTART?=${RC_RESTART} which have to be
explicitly enabled. RESTART is a bad name, though, since it suggests
"restart". RC_POWERCYCLE would at least be obvious to every reader but
clearly isn't suitable.

pkg_add should honour this as well. Even if you enabled RC_RESTART: Since
for RCng you didn't yet enable the service in rc.conf, nothing bad happens
(e.g. kris coming down on us :).

How does this all relate to .PLIST.startup? Can we use this to get around
explictely listing the RC-files?

Volker
-- 
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME


More information about the freebsd-ports mailing list