rc.subr extensions

Oliver Eikemeier eikemeier at fillmore-labs.com
Tue Nov 9 15:46:43 GMT 2004

Volker Stolz wrote:

> In gmane.os.freebsd.devel.ports, you wrote:
>> - define RC_FILES, which contain a list of all the files to be
>>   stored in /usr/local/etc/rc.d. This file may contain macros like
>>   %%LOCALBASE%% and %%RC_SUBR%%.
> 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?

This might be a bad idea, because:

- a port might not run well when deinstalled (even when it does on the 
porters machine, it might fail in a different configuration)
   generally I think daemons should be terminated before deinstalling the 

- the configuration files might be incompatible with the new version

Generally, you can achieve this effect with portupgrade(1) (see 
BEFOREBUILD/AFTERINSTALL in pkgtools.conf(5)). What might be useful 
could be a `make start|stop|restart'.


More information about the freebsd-ports mailing list