Date: Wed, 10 Nov 2004 12:41:11 +0100 From: Volker Stolz <stolz@i2.informatik.rwth-aachen.de> To: Alexander@Leidinger.net Cc: freebsd-ports@freebsd.org Subject: Re: rc.subr extensions Message-ID: <20041110114111.GH86790@i2.informatik.rwth-aachen.de> In-Reply-To: <1100084770.4191f6222333d@netchild.homeip.net> References: <20041109040834.GA8940@k7.mavetju> <20041109080124.GA59253@i2.informatik.rwth-aachen.de> <1100084770.4191f6222333d@netchild.homeip.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Am 10. Nov 2004 um 12:06 CET schrieb Alexander@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041110114111.GH86790>