diff --git a/tools/tools/makeroot/makeroot.8 b/tools/tools/makeroot/makeroot.8 index 379187c910dd..0ba3fdcad05c 100644 --- a/tools/tools/makeroot/makeroot.8 +++ b/tools/tools/makeroot/makeroot.8 @@ -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 diff --git a/tools/tools/makeroot/makeroot.sh b/tools/tools/makeroot/makeroot.sh index ed448191d585..a1e669766bf0 100755 --- a/tools/tools/makeroot/makeroot.sh +++ b/tools/tools/makeroot/makeroot.sh @@ -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; do 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}