Date: Sun, 14 Nov 2010 00:09:33 -0800 From: Garrett Cooper <yanegomi@gmail.com> To: rc@freebsd.org Cc: Doug Barton <dougb@freebsd.org> Subject: [PATCH] Minor mdconfig rc.d script tweaks and documentation improvements Message-ID: <AANLkTik=YqUa2F4kYTPAy4zrTBiEUJQATchtAE8BtHk1@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi RC folks,
The following request resolves 2 PRs in the database which ask
that the mdconfig rc.d process be made more straightforward.
If someone could review and commit this change (if they don't
object with it), I would appreciate it (as well as the submitters I'm
sure).
Thanks!
-Garrett
Add the ability to specify md(4) units when running the mdconfig rc scripts
and better document the overall process.
This allows folks to preconfigure units using a supported method that aren't
md0 and up, in the event that build infrastructure, etc can't be easily
changed to deal with device name collisions.
The enumeration process itself wasn't fully documented, so better
document what occurs when the script is executed.
PR: conf/137470, docs/144537
[-- Attachment #2 --]
Index: etc/rc.d/mdconfig
===================================================================
--- etc/rc.d/mdconfig (revision 214907)
+++ etc/rc.d/mdconfig (working copy)
@@ -174,6 +174,7 @@
}
_mdconfig_cmd="$1"
+_mdconfig_list=$mdconfig_units
if [ $# -gt 0 ]; then
shift
fi
Index: etc/rc.d/mdconfig2
===================================================================
--- etc/rc.d/mdconfig2 (revision 214907)
+++ etc/rc.d/mdconfig2 (working copy)
@@ -204,6 +204,7 @@
}
_mdconfig2_cmd="$1"
+_mdconfig2_list=$mdconfig_units
if [ $# -gt 0 ]; then
shift
fi
Index: share/man/man5/rc.conf.5
===================================================================
--- share/man/man5/rc.conf.5 (revision 214907)
+++ share/man/man5/rc.conf.5 (working copy)
@@ -3997,6 +3997,18 @@
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 .
+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 below).
.It Va mdconfig_md Ns Aq Ar X
.Pq Vt str
Arguments to
@@ -4015,10 +4027,10 @@
.Fl f Ar file
for vnode backed
.Xr md 4
-devices.
-Note that
-.Va mdconfig_md Ns Aq Ar X
-variables are evaluated until one variable is unset or null.
+devices. Each
+.Xr md 4
+device to be configured 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik=YqUa2F4kYTPAy4zrTBiEUJQATchtAE8BtHk1>
