From owner-freebsd-current Sun Feb 4 0:45:26 2001 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 84BED37B401 for ; Sun, 4 Feb 2001 00:45:07 -0800 (PST) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id f148j4B17571; Sun, 4 Feb 2001 09:45:05 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Makoto MATSUSHITA Cc: current@freebsd.org Subject: Re: doFS.sh should obey MDDEVICE if available In-Reply-To: Your message of "Sun, 04 Feb 2001 08:24:09 +0900." <20010204082409C.matusita@jp.FreeBSD.org> Date: Sun, 04 Feb 2001 09:45:04 +0100 Message-ID: <17569.981276304@critter> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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