svn commit: r272393 - head/etc

Colin Percival cperciva at freebsd.org
Thu Oct 2 01:31:06 UTC 2014


On 10/01/14 18:16, Hiroki Sato wrote:
>   This is an attempt to solve a problem that rc.d scripts from third-party
>   software do not have entries in /etc/defaults/rc.conf.

Isn't this why we have the
> : ${foo_enable="NO"}
idiom in ports rc.d files?

>   The fact that
>   load_rc_config() reads rc.conf only once and /etc/rc invokes the function
>   before running rc.d scripts made developers confused for a long time because
>   load_rc_config() just before run_rc_command() in each rc.d script overrides
>   variables only when the script is directly invoked, not from /etc/rc.

If a script is setting variables for its own use, there's no need to use
functions from rc.subr -- it can just set the variables directly.  If a
script is editing rc.conf, sending a SIGALRM to $$ will signal /etc/rc to
re-source rc.conf.

I'm really not clear on what this commit accomplishes.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid



More information about the svn-src-head mailing list