Index: src/etc/mtree/BSD.local.dist =================================================================== RCS file: /home/ncvs/src/etc/mtree/BSD.local.dist,v retrieving revision 1.118 diff -u -r1.118 BSD.local.dist --- src/etc/mtree/BSD.local.dist 8 Jan 2006 10:15:30 -0000 1.118 +++ src/etc/mtree/BSD.local.dist 21 Apr 2006 13:50:41 -0000 @@ -8,8 +8,12 @@ bin .. etc + defaults + .. pam.d .. + rc.conf.d + .. rc.d .. .. Index: src/etc/mtree/BSD.x11-4.dist =================================================================== RCS file: /home/ncvs/src/etc/mtree/BSD.x11-4.dist,v retrieving revision 1.31 diff -u -r1.31 BSD.x11-4.dist --- src/etc/mtree/BSD.x11-4.dist 14 Mar 2006 18:23:35 -0000 1.31 +++ src/etc/mtree/BSD.x11-4.dist 21 Apr 2006 13:50:41 -0000 @@ -8,6 +8,10 @@ bin .. etc + defaults + .. + rc.conf.d + .. rc.d .. .. Index: src/etc/rc.subr =================================================================== RCS file: /home/ncvs/src/etc/rc.subr,v retrieving revision 1.56 diff -u -r1.56 rc.subr --- src/etc/rc.subr 18 Apr 2006 15:16:55 -0000 1.56 +++ src/etc/rc.subr 21 Apr 2006 13:50:41 -0000 @@ -915,6 +915,11 @@ . /etc/rc.conf.d/${_name} fi + if [ -f ${etcdir}/defaults/${_name} ]; then + debug "Sourcing ${etcdir}/defaults/${_name}" + . ${etcdir}/defaults/${_name} + fi + if [ -f ${etcdir}/rc.conf.d/${_name} ]; then debug "Sourcing ${etcdir}/rc.conf.d/${_name}" . ${etcdir}/rc.conf.d/${_name} Index: src/share/man/man8/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 --- src/share/man/man8/rc.subr.8 4 Apr 2006 10:52:15 -0000 1.11 +++ src/share/man/man8/rc.subr.8 21 Apr 2006 13:50:42 -0000 @@ -36,7 +36,7 @@ .\" .\" $FreeBSD: src/share/man/man8/rc.subr.8,v 1.11 2006/04/04 10:52:15 flz Exp $ .\" -.Dd April 4, 2006 +.Dd April 21, 2006 .Dt RC.SUBR 8 .Os .Sh NAME @@ -64,9 +64,9 @@ .It .Ic info Ar message .It -.Ic load_rc_config Ar command +.Ic load_rc_config Ar name .It -.Ic load_rc_config_var Ar command Ar var +.Ic load_rc_config_var Ar name Ar var .It .Ic mount_critical_filesystems Ar type .It @@ -312,28 +312,54 @@ .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/defaults/rc.conf +and .Pa /etc/rc.conf -is sourced if it has not yet been read in. +are sourced if they have not yet been read in. Then, -.Pa /etc/rc.conf.d/ Ns Ar command -is sourced if it is an existing file. -The latter may also contain other variable assignments to override +.Va etcdir +variable is set to +.Pa /etc +if +.Va command Ap s +prefix (or +.Va ${name} Ns Va _program Ap s +if it is defined) is +.Pa / +or +.Pa /usr , +otherwise +.Va etcdir +is set to +.Pa ${prefix} Ns Pa /etc . +Once those variables are set accordingly, +.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 +.Pa ${etcdir} Ns Pa /defaults/ Ns Va ${name} +and +.Va ${etcdir} Ns Pa /rc.conf.d/ Ns Va ${name} +are sourced if these files exist. +All these files 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 Index: src/sys/sys/param.h =================================================================== RCS file: /home/ncvs/src/sys/sys/param.h,v retrieving revision 1.264 diff -u -r1.264 param.h --- src/sys/sys/param.h 26 Mar 2006 12:20:54 -0000 1.264 +++ src/sys/sys/param.h 21 Apr 2006 13:50:42 -0000 @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 700015 /* Master, propagated to newvers */ +#define __FreeBSD_version 700016 /* Master, propagated to newvers */ #ifndef LOCORE #include