ports/162049: The Ports tree lacks a framework to restart services

Thomas Steen Rasmussen thomas at gibfest.dk
Thu Oct 27 15:10:58 UTC 2011


On 27.10.2011 15:04, Wesley Shields wrote:
>
> I agree inconsistency is a problem that could be addressed, but I don't
> particularly agree with some of your statements.
>

Consistency is important, and I agree with Wesley that we should
consistently "do nothing", instead of consistently stopping/starting
daemons.

>
>> - If I upgrade Dovecot, it shuts it down during the upgrade, but won't
>>   restart it. This means that I have to watch portmaster to complete and
>>   must not forget to restart Dovecot afterwards.
> Unless it is absolutely necessary to stop and restart dovecot during an
> upgrade I would like to see this removed.

I have a hard time imagining a situation where this is the case,
and again I agree with Wesley, I would also like to see it removed.
The dovecot stopping thing has bitten me more than once.

>
>> My question is whether anyone has ever attempted to improve the
>> integration with rc-scripts? In the PR I propose something along these
>> lines:
>>
>> 	We know exactly which ports install rc scripts (USE_RC_SUBR).
>> 	Why not run `/usr/local/etc/rc.d/${FOO} status' and
>> 	`/usr/local/etc/rc.d/${FOO} stop' prior to installation. Based
>> 	on the return value of the first, we can run
>> 	`/usr/local/etc/rc.d/${FOO} start' after installation.

This can fail in so many unexpected ways that IMO it is much better
to do nothing at all, and leave it up to the sysadmin to decide when
to restart the daemon.

If anything like this is needed, perhaps we could add a message after
upgrading a port which installs an RC script, mentioning that the
sysadmin needs to restart the daemon manually (whenever appropriate)
in order to run the new version.

Best regards,

Thomas Steen Rasmussen


More information about the freebsd-ports mailing list