Check the FSLABEL argument and invoke the generic doFS.sh script

if it's not defined as efi. This makes sure we create a proper
MFS root filesystem and still allow the boot disk to be EFI
based.

At this time EFI auto boot works and we're properly loading the
MFS root file system. Time to create drivers.conf and get this
show on the road!
This commit is contained in:
Marcel Moolenaar 2002-11-06 03:36:57 +00:00
parent 81ccbd2ad1
commit d47aff5ca6

View File

@ -7,12 +7,10 @@
set -e set -e
export BLOCKSIZE=512
if [ "$1" = "-s" ]; then if [ "$1" = "-s" ]; then
do_size="yes"; shift opt_s="-s"; shift
else else
do_size="" opt_s=""
fi fi
FSIMG=$1; shift FSIMG=$1; shift
@ -23,6 +21,16 @@ FSPROTO=$1 ; shift
FSINODE=$1 ; shift FSINODE=$1 ; shift
FSLABEL=$1 ; shift FSLABEL=$1 ; shift
# If the disklabel is not equal to "efi", we have to create a "normal"
# UFS filesystem. In that case, call the generic version:
if [ x$FSLABEL != "xefi" ]; then
DOFS_SH=`dirname $0`/../scripts/`basename $0`
echo Tranferring control to $DOFS_SH...
exec sh $DOFS_SH $opt_s $FSIMG $RD $MNT $FSSIZE $FSPROTO $FSINODE $FSLABEL
fi
export BLOCKSIZE=512
# Express the size on 512-byte blocks for newfs_msdos # Express the size on 512-byte blocks for newfs_msdos
FSSIZE=$((${FSSIZE}*2)) FSSIZE=$((${FSSIZE}*2))
@ -72,6 +80,6 @@ mdconfig -d -u ${MDDEVICE} 2>/dev/null || true
echo "*** Filesystem is ${FSSIZE} K, $4 left" echo "*** Filesystem is ${FSSIZE} K, $4 left"
echo "*** ${FSINODE} bytes/inode, $7 left" echo "*** ${FSINODE} bytes/inode, $7 left"
if [ "${do_size}" ]; then if [ "${opt_s}" ]; then
echo ${FSSIZE} > ${FSIMG}.size echo ${FSSIZE} > ${FSIMG}.size
fi fi