--- etc/rc.d/mdconfig (revision 229307) +++ etc/rc.d/mdconfig (working copy) @@ -174,10 +174,11 @@ } _mdconfig_cmd="$1" +eval _mdconfig_list=\$mdconfig_units if [ $# -gt 0 ]; then shift fi -[ -n "$*" ] && _mdconfig_list="$*" +[ -z "$_mdconfig_list" -a -n "$*" ] && _mdconfig_list="$*" load_rc_config $name --- etc/rc.d/mdconfig2 (revision 229307) +++ etc/rc.d/mdconfig2 (working copy) @@ -204,10 +204,11 @@ } _mdconfig2_cmd="$1" +eval _mdconfig2_list=\$mdconfig_units if [ $# -gt 0 ]; then shift fi -[ -n "$*" ] && _mdconfig2_list="$*" +[ -z "$_mdconfig2_list" -a -n "$*" ] && _mdconfig2_list="$*" load_rc_config $name --- share/man/man5/rc.conf.5 (revision 229307) +++ share/man/man5/rc.conf.5 (working copy) @@ -4203,6 +4203,23 @@ which causes log files flagged with a .Cm C to be created. +.It Va mdconfig_units +.Pq Vt str +A list of one or more +.Xr md 4 +units to configure with +.Xr mdconfig 8 +and +.Xr newfs 8 +in time to be mounted with +.Xr fstab 5 . +If unspecified, the +.Va mdconfig_md Ns Aq Ar X +variables are evaluated in consecutive order from md0, until one variable is +unset or null. +See the +.Va mdconfig_md Ns Aq Ar X +variable descriptions below for more details. .It Va mdconfig_md Ns Aq Ar X .Pq Vt str Arguments to @@ -4221,10 +4238,12 @@ .Fl f Ar file for vnode backed .Xr md 4 -devices. -Note that +devices. Each .Va mdconfig_md Ns Aq Ar X -variables are evaluated until one variable is unset or null. +entry listed in +.Va mdconfig_units +must be defined in +.Xr fstab 5 . .It Va mdconfig_md Ns Ao Ar X Ac Ns Va _newfs .Pq Vt str Optional arguments passed to