summaryrefslogtreecommitdiffstats
path: root/release/scripts
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-03-20 23:46:22 +0000
committerru <ru@FreeBSD.org>2003-03-20 23:46:22 +0000
commit18bbff56056cc6fd3c51a8a21a50f257c2ef1fcd (patch)
tree616fa25a38df3d7a5594d6717c82c0beb996c3b4 /release/scripts
parenta3529ba22b1d7664e49d97daa5966b528b494381 (diff)
downloadFreeBSD-src-18bbff56056cc6fd3c51a8a21a50f257c2ef1fcd.zip
FreeBSD-src-18bbff56056cc6fd3c51a8a21a50f257c2ef1fcd.tar.gz
Pass the target machine architecture down to disklabel(8).
Do it so that systems without the -m option in disklabel(8), e.g. 5.0-RELEASE, can still build current snapshots. While here, drop the -s option from doFS.sh; we have not been using the .size files for a long time.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/doFS.sh25
1 files changed, 7 insertions, 18 deletions
diff --git a/release/scripts/doFS.sh b/release/scripts/doFS.sh
index ed861ff..8d870fb 100644
--- a/release/scripts/doFS.sh
+++ b/release/scripts/doFS.sh
@@ -7,12 +7,7 @@ set -ex
export BLOCKSIZE=512
-if [ "$1" = "-s" ]; then
- do_size="yes"; shift
-else
- do_size=""
-fi
-
+MACHINE=${1:+"-m $1"}; shift
FSIMG=$1; shift
RD=$1 ; shift
MNT=$1 ; shift
@@ -27,14 +22,14 @@ FSLABEL=$1 ; shift
# disklabel fails otherwise.
#
if [ -f "${RD}/trees/base/boot/boot" ]; then
- BOOT1="-B -b ${RD}/trees/base/boot/boot"
+ BOOT="-B -b ${RD}/trees/base/boot/boot"
elif [ -f "${RD}/trees/base/boot/boot1" ]; then
- BOOT1="-B -b ${RD}/trees/base/boot/boot1"
+ BOOT="-B -b ${RD}/trees/base/boot/boot1"
if [ -f "${RD}/trees/base/boot/boot2" ]; then
- BOOT2="-s ${RD}/trees/base/boot/boot2"
+ BOOT="${BOOT} -s ${RD}/trees/base/boot/boot2"
fi
else
- BOOT1="-r"
+ BOOT="-r"
fi
deadlock=20
@@ -63,7 +58,7 @@ dofs_vn () {
dd of=${FSIMG} if=/dev/zero count=${FSSIZE} bs=1k 2>/dev/null
vnconfig -s labels -c /dev/r${VNDEVICE} ${FSIMG}
- disklabel -w ${BOOT1} ${BOOT2} ${VNDEVICE} ${FSLABEL}
+ disklabel -w ${BOOT} ${VNDEVICE} ${FSLABEL}
newfs -i ${FSINODE} -o space -m 0 /dev/r${VNDEVICE}c
mount /dev/${VNDEVICE}c ${MNT}
@@ -83,9 +78,6 @@ dofs_vn () {
echo "*** Filesystem is ${FSSIZE} K, $4 left"
echo "*** ${FSINODE} bytes/inode, $7 left"
- if [ "${do_size}" ]; then
- echo ${FSSIZE} > ${FSIMG}.size
- fi
break;
done
@@ -110,7 +102,7 @@ dofs_md () {
echo "No /dev/$MDDEVICE" 1>&2
exit 1
fi
- disklabel -w ${BOOT1} ${BOOT2} ${MDDEVICE} ${FSLABEL}
+ disklabel ${MACHINE} -w ${BOOT} ${MDDEVICE} ${FSLABEL}
newfs -i ${FSINODE} -o space -m 0 /dev/${MDDEVICE}c
mount /dev/${MDDEVICE}c ${MNT}
@@ -130,9 +122,6 @@ dofs_md () {
echo "*** Filesystem is ${FSSIZE} K, $4 left"
echo "*** ${FSINODE} bytes/inode, $7 left"
- if [ "${do_size}" ]; then
- echo ${FSSIZE} > ${FSIMG}.size
- fi
break;
done
}
OpenPOWER on IntegriCloud