Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 Feb 2001 09:45:04 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
Cc:        current@freebsd.org
Subject:   Re: doFS.sh should obey MDDEVICE if available 
Message-ID:  <17569.981276304@critter>
In-Reply-To: Your message of "Sun, 04 Feb 2001 08:24:09 %2B0900." <20010204082409C.matusita@jp.FreeBSD.org> 

next in thread | previous in thread | raw e-mail | index | archive | help

Since mdconfig can autoallocate the device, why is this needed ?

In message <20010204082409C.matusita@jp.FreeBSD.org>, Makoto MATSUSHITA writes:
>
>src/release/scripts/doFS.sh rev. 1.6 doesn't consider MDDEVICE variable
>(formaly, VNDEVICE). Here is a sample fix to use MDDEVICE variable to
>configure md -- trivial, add '-u' option if MDDEVICE is already defined.
>
>-- -
>Makoto `MAR' MATSUSHITA
>
>Index: doFS.sh
>===================================================================
>RCS file: /pub/cvsup/FreeBSD.cvs/src/release/scripts/doFS.sh,v
>retrieving revision 1.29
>diff -c -r1.29 doFS.sh
>*** doFS.sh	2001/01/31 22:58:39	1.29
>--- doFS.sh	2001/02/03 23:16:51
>***************
>*** 37,43 ****
>  	awk 'BEGIN {printf "%c%c", 85, 170}' |\
>  	    dd of=${FSIMG} obs=1 seek=510 conv=notrunc 2>/dev/null
>  
>! 	MDDEVICE=`mdconfig -a -t vnode -f ${FSIMG}`
>  	if [ ! -c /dev/${MDDEVICE} ] ; then
>  		if [ -f /dev/MAKEDEV ] ; then
>  			( cd /dev && sh MAKEDEV ${MDDEVICE} )
>--- 37,47 ----
>  	awk 'BEGIN {printf "%c%c", 85, 170}' |\
>  	    dd of=${FSIMG} obs=1 seek=510 conv=notrunc 2>/dev/null
>  
>! 	if [ "x${MDDEVICE}" != "x" ] ; then
>! 		mdconfig -a -t vnode -f ${FSIMG} -u ${MDDEVICE}
>! 	else
>! 		MDDEVICE=`mdconfig -a -t vnode -f ${FSIMG}`
>! 	fi
>  	if [ ! -c /dev/${MDDEVICE} ] ; then
>  		if [ -f /dev/MAKEDEV ] ; then
>  			( cd /dev && sh MAKEDEV ${MDDEVICE} )
>

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17569.981276304>