HEADS UP: set_rcvar() removed from rc.subr

Jilles Tjoelker jilles at stack.nl
Sat Jan 14 14:44:47 UTC 2012


On Sat, Jan 14, 2012 at 01:05:59AM -0800, Doug Barton wrote:
> Per discussion in freebsd-rc@, I have removed set_rcvar() from rc.subr.
> The concept of set_rcvar() was nice in theory, but the forks it creates
> are a drag on the startup process, which is especially noticeable on
> slower systems, such as embedded ones.

> I have no plans to MFC this change, so it should only affect users who
> are actually on 10-current. If you have scripts in /usr/local/etc/rc.d
> (which if you have ports installed you almost certainly do) ...

> to make the change by hand, change this:

> name=foo
> rcvar=`set_rcvar`

> to:

> name=foo
> rcvar=foo_enable

> I didn't bump PORTREVISIONs because the change only applies to HEAD. But
> all of the ports are updated, so if you can't figure out how to make the
> change, just reinstall it.

Why must the 2-argument form of set_rcvar die at the same time? It is
used very differently and does not cause unnecessary forks. Instead, it
is called in the same shell environment to define additional rc.conf
variables that have defaults and are shown in '<script> rcvar'.

-- 
Jilles Tjoelker


More information about the freebsd-current mailing list