Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/cgdconfig Document that cgd.conf supports NAME=label an...



details:   https://anonhg.NetBSD.org/src/rev/45af827d6d3f
branches:  trunk
changeset: 447001:45af827d6d3f
user:      alnsn <alnsn%NetBSD.org@localhost>
date:      Thu Dec 27 21:17:08 2018 +0000

description:
Document that cgd.conf supports NAME=label and ROOT.<suffix> targets.

XXX Default paramsfile for NAME=label is /etc/cgd/dkNN (resolved wedge
partition) and /etc/cgd/ROOT.<suffix> for ROOT.<suffix>. This isn't yet
documented. IMO, it should be the other way around: /etc/cgd/label
for the former and /et/cgd/[root-device] for the latter.

diffstat:

 sbin/cgdconfig/cgdconfig.8 |  26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diffs (61 lines):

diff -r 0c54734ad414 -r 45af827d6d3f sbin/cgdconfig/cgdconfig.8
--- a/sbin/cgdconfig/cgdconfig.8        Thu Dec 27 19:35:31 2018 +0000
+++ b/sbin/cgdconfig/cgdconfig.8        Thu Dec 27 21:17:08 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: cgdconfig.8,v 1.41 2018/09/01 11:46:52 prlw1 Exp $
+.\" $NetBSD: cgdconfig.8,v 1.42 2018/12/27 21:17:08 alnsn Exp $
 .\"
 .\" Copyright (c) 2002, The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 9, 2018
+.Dd Dec 27, 2018
 .Dt CGDCONFIG 8
 .Os
 .Sh NAME
@@ -248,6 +248,24 @@
 at the end of a line indicates that the next line is a continuation of
 the current line.
 .Pp
+If the second field is of the form
+.Dq NAME=<value>
+then all the
+.Xr dk 4
+wedge partitions are searched for one that has a wedge name equal to
+.Ar <value>
+and the device corresponding to it is selected.
+.Pp
+If the second field starts with the prefix
+.Dq ROOT.
+the prefix is replaced with
+.Dq /dev/[root_device] ,
+where
+.Bq root_device
+is the value of the
+.Dq kern.root_device
+sysctl.
+.Pp
 See
 .Sx EXAMPLES
 for an example of
@@ -418,7 +436,7 @@
 
        # cgd           target          [paramsfile]
        cgd0            /dev/wd0e
-       cgd1            /dev/sd0h       /usr/local/etc/cgd/sd0h
+       cgd1            NAME=mycgd      /usr/local/etc/cgd/mycgd
 .Ed
 .Pp
 Note the first entry will store the parameters file as
@@ -439,6 +457,8 @@
 .Sh SEE ALSO
 .Xr cgd 4 ,
 .Xr disklabel 8 ,
+.Xr dk 4 ,
+.Xr fstab 5 ,
 .Xr gpt 8
 .Pp
 .Dq PKCS #5 v2.0: Password-Based Cryptography Standard ,



Home | Main Index | Thread Index | Old Index