mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
This took longer to test than expected:
NODEVFS cleanup: don't bother with MAKEDEV. Look for /boot/boot first, and arrange disklabel arguments accordingly.
This commit is contained in:
parent
8b24576748
commit
d103a0422a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110208
@ -3,7 +3,7 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
export BLOCKSIZE=512
|
||||
|
||||
@ -26,16 +26,16 @@ FSLABEL=$1 ; shift
|
||||
# so we have to specifically specify -r when we don't have -B.
|
||||
# disklabel fails otherwise.
|
||||
#
|
||||
if [ -f "${RD}/trees/base/boot/boot1" ]; then
|
||||
if [ -f "${RD}/trees/base/boot/boot" ]; then
|
||||
BOOT1="-B -b ${RD}/trees/base/boot/boot"
|
||||
elif [ -f "${RD}/trees/base/boot/boot1" ]; then
|
||||
BOOT1="-B -b ${RD}/trees/base/boot/boot1"
|
||||
if [ -f "${RD}/trees/base/boot/boot2" ]; then
|
||||
BOOT2="-s ${RD}/trees/base/boot/boot2"
|
||||
fi
|
||||
else
|
||||
BOOT1="-r"
|
||||
fi
|
||||
if [ -f "${RD}/trees/base/boot/boot2" ]; then
|
||||
BOOT2="-s ${RD}/trees/base/boot/boot2"
|
||||
else
|
||||
BOOT2=""
|
||||
fi
|
||||
|
||||
deadlock=20
|
||||
|
||||
@ -107,12 +107,8 @@ dofs_md () {
|
||||
|
||||
MDDEVICE=`mdconfig -a -t vnode -f ${FSIMG}`
|
||||
if [ ! -c /dev/${MDDEVICE} ] ; then
|
||||
if [ -f /dev/MAKEDEV ] ; then
|
||||
( cd /dev && sh MAKEDEV ${MDDEVICE} )
|
||||
else
|
||||
echo "No /dev/$MDDEVICE and no MAKEDEV" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
echo "No /dev/$MDDEVICE" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
disklabel -w ${BOOT1} ${BOOT2} ${MDDEVICE} ${FSLABEL}
|
||||
newfs -i ${FSINODE} -o space -m 0 /dev/${MDDEVICE}c
|
||||
|
Loading…
Reference in New Issue
Block a user