svn commit: r278318 - head/tools/tools/makeroot
Ed Maste
emaste at FreeBSD.org
Fri Feb 6 15:38:12 UTC 2015
Author: emaste
Date: Fri Feb 6 15:38:11 2015
New Revision: 278318
URL: https://svnweb.freebsd.org/changeset/base/278318
Log:
makeroot: Add -l option to set file system volume label
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D1782
Modified:
head/tools/tools/makeroot/makeroot.8
head/tools/tools/makeroot/makeroot.sh
Modified: head/tools/tools/makeroot/makeroot.8
==============================================================================
--- head/tools/tools/makeroot/makeroot.8 Fri Feb 6 15:34:10 2015 (r278317)
+++ head/tools/tools/makeroot/makeroot.8 Fri Feb 6 15:38:11 2015 (r278318)
@@ -41,6 +41,7 @@
.Op Fl e Ar extras-manifest
.Op Fl f Ar filelist
.Op Fl k Ar keydir Op Fl K Ar user
+.Op Fl l Ar label
.Op Fl p Ar master.passwd Op Fl g Ar group
.Op Fl s Ar size
.Ar image-file
@@ -94,6 +95,8 @@ If no
.Fl K
argument is supplied then the files will be installed in the root user's
directory.
+.It Fl l Ar label
+Set the file system volume label.
.It Fl p Ar master.passwd Op Fl g Ar group
Install an alternate
.Ar master.passwd
Modified: head/tools/tools/makeroot/makeroot.sh
==============================================================================
--- head/tools/tools/makeroot/makeroot.sh Fri Feb 6 15:34:10 2015 (r278317)
+++ head/tools/tools/makeroot/makeroot.sh Fri Feb 6 15:38:11 2015 (r278318)
@@ -75,7 +75,7 @@ KEYDIR=
KEYUSERS=
PASSWD=
-while getopts "B:de:f:g:K:k:p:s:" opt; do
+while getopts "B:de:f:g:K:k:l:p:s:" opt; do
case "$opt" in
B) BFLAG="-B ${OPTARG}" ;;
d) DEBUG=1 ;;
@@ -84,6 +84,7 @@ while getopts "B:de:f:g:K:k:p:s:" opt; d
g) GROUP="${OPTARG}" ;;
K) KEYUSERS="${KEYUSERS} ${OPTARG}" ;;
k) KEYDIR="${OPTARG}" ;;
+ l) LABEL="${OPTARG}" ;;
p) PASSWD="${OPTARG}" ;;
s) SIZE="${OPTARG}" ;;
*) usage ;;
@@ -230,9 +231,12 @@ if [ -n "${KEYDIR}" ]; then
done
fi
+if [ -n "${LABEL}" ]; then
+LABELFLAG="-o label=${LABEL}"
+fi
if [ -n "${SIZE}" ]; then
SIZEFLAG="-s ${SIZE}"
fi
cd ${BSDROOT}; makefs ${DUPFLAG} -N ${DBDIR} ${SIZEFLAG} ${BFLAG} \
- -t ffs -f 256 ${IMGFILE} ${manifest}
+ -t ffs ${LABELFLAG} -f 256 ${IMGFILE} ${manifest}
More information about the svn-src-all
mailing list