Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Mar 2008 12:15:38 -0400
From:      Wesley Shields <wxs@FreeBSD.org>
To:        Miroslav Lachman <000.fbsd@quip.cz>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: portmaster and restarting of upgraded daemons
Message-ID:  <20080323161538.GB41098@atarininja.org>
In-Reply-To: <47E676D9.3040603@quip.cz>
References:  <47E660A3.3050805@quip.cz> <20080323144823.GA72507@eos.sc1.parodius.com> <20080323150407.GA41098@atarininja.org> <47E676D9.3040603@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 23, 2008 at 04:27:21PM +0100, Miroslav Lachman wrote:
> Wesley Shields wrote:
>> On Sun, Mar 23, 2008 at 07:48:23AM -0700, Jeremy Chadwick wrote:
>> 
>>> On Sun, Mar 23, 2008 at 02:52:35PM +0100, Miroslav Lachman wrote:
>>> 
>>>> I am almost new to portmaster, so I got a question - is there any 
>>>> possibility to restart installed services as in portupgrade with defined 
>>>> BEFOREBUILD / BEFOREDEINSTALL / AFTERINSTALL? Or is there any future 
>>>> plan to do so? It is annoying if I end up with some dead services after 
>>>> upgrade just because I forgot to manualy do 
>>>> /usr/local/etc/rc.d/some_daemon restart
>>> 
>>> This is more a complaint about the existing ports infrastructure, as
>>> IMHO, it's something that should be handled there and not necessarily by
>>> "third-party" port management utilities.
>>> 
>>> Some existing ports (such as smartmontools, i.e. smartd) do this, while
>>> others (such as postfix) do not.
>> 
>> 
>> There is an @stopdaemon facility which can be used in the plist.  In
>> fact, it might be a smart idea to remove the way smartmontools does it
>> and replace it with @stopdaemon for consistency sake.
>> 
>> 
>>> There are pros and cons to what you want.  I myself have never managed
>>> to conclude if the pros outweigh the cons -- or vice-versa -- but I have
>>> thought about it before.
>> 
>> 
>> Personally, I do not want anything stopping or starting services on it's
>> own.  That is something that I, as an administrator, should be handling.
>> Of course others are entitled to disagree.  :)
> 
> If I am upgrading just one port, I can restart it manualy, but if I do 
> someting like `portmaster -a`, it is long running job and I do not want to 
> wait and check for each port when it is right time to manualy restart the 
> daemon.
> So I think portmaster can have some hooks to call user defined code 
> (sourced from portmaster.rc?) before or after install routine.

That's entirely up to Doug, but it could potentially be a good idea IMO.
It's kind of like the description I give below but moving it out of
ports and into portmaster, and making the code entirely user defined.

>> With that said, it may be interesting to have a knob which allows for
>> services to be started right away if desired by the user, and if the
>> port supports such a situation (ie: it does not require any
>> configuration after the install).  The default for the user-defined knob
>> would be off, for at least POLA reasons.

-- WXS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080323161538.GB41098>