Index: rc.subr.8 =================================================================== RCS file: /home/ncvs/src/share/man/man8/rc.subr.8,v retrieving revision 1.11 diff -u -r1.11 rc.subr.8 --- rc.subr.8 4 Apr 2006 10:52:15 -0000 1.11 +++ rc.subr.8 4 Apr 2006 16:39:27 -0000 @@ -312,28 +312,52 @@ .Xr rc.conf 5 variable .Va rc_info . -.It Ic load_rc_config Ar command +.It Ic load_rc_config Ar name Source in the configuration files for -.Ar command . +.Ar name . First, .Pa /etc/rc.conf is sourced if it has not yet been read in. Then, -.Pa /etc/rc.conf.d/ Ns Ar command -is sourced if it is an existing file. +.Va etcdir +variable is set to +.Pa /etc +if the +.Va ${command} Ap s +prefix (or +.Va ${${name}_program} Ap s +if it is defined) is +.Pa / +or +.Pa /usr , +otherwise +.Va etcdir +is set to +.Va ${prefix} Ns Pa /etc . +.Pa /etc/rc.conf.d/ Ns Va ${name} +is sourced if the file exists (but it is deprecated if +.Va ${etcdir} +is different than +.Pa /etc ) +and then +.Va ${etcdir} Ns Pa /rc.conf.d/ Ns Va ${name} +is sourced if the file exists. +Note that, at some point, +.Pa /etc/rc.conf.d/ Ns Va ${name} +will not be sourced anymore. The latter may also contain other variable assignments to override .Ic run_rc_command arguments defined by the calling script, to provide an easy mechanism for an administrator to override the behaviour of a given .Xr rc.d 8 script without requiring the editing of that script. -.It Ic load_rc_config_var Ar command Ar var +.It Ic load_rc_config_var Ar name Ar var Read the .Xr rc.conf 5 variable .Ar var for -.Ar command +.Ar name and set in the current shell, using .Ic load_rc_config in a sub-shell to prevent unwanted side effects from other variable