From owner-svn-src-head@FreeBSD.ORG Fri Feb 6 15:38:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8528E94; Fri, 6 Feb 2015 15:38:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79E4A1B0; Fri, 6 Feb 2015 15:38:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t16FcCSj077520; Fri, 6 Feb 2015 15:38:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t16FcCJm077518; Fri, 6 Feb 2015 15:38:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201502061538.t16FcCJm077518@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 6 Feb 2015 15:38:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278318 - head/tools/tools/makeroot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 15:38:12 -0000 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}