summaryrefslogtreecommitdiffstats
path: root/release/scripts/doFS.sh
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/doFS.sh')
-rw-r--r--release/scripts/doFS.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/release/scripts/doFS.sh b/release/scripts/doFS.sh
index 8d870fb..08d97a6 100644
--- a/release/scripts/doFS.sh
+++ b/release/scripts/doFS.sh
@@ -58,6 +58,9 @@ dofs_vn () {
dd of=${FSIMG} if=/dev/zero count=${FSSIZE} bs=1k 2>/dev/null
vnconfig -s labels -c /dev/r${VNDEVICE} ${FSIMG}
+
+ trap "umount ${MNT}; vnconfig -u /dev/r${VNDEVICE}" EXIT
+
disklabel -w ${BOOT} ${VNDEVICE} ${FSLABEL}
newfs -i ${FSINODE} -o space -m 0 /dev/r${VNDEVICE}c
@@ -73,9 +76,6 @@ dofs_vn () {
set `df -ki ${MNT} | tail -1`
- umount ${MNT}
- vnconfig -u /dev/r${VNDEVICE} 2>/dev/null || true
-
echo "*** Filesystem is ${FSSIZE} K, $4 left"
echo "*** ${FSINODE} bytes/inode, $7 left"
break;
@@ -102,6 +102,9 @@ dofs_md () {
echo "No /dev/$MDDEVICE" 1>&2
exit 1
fi
+
+ trap "umount ${MNT}; mdconfig -d -u ${MDDEVICE}" EXIT
+
disklabel ${MACHINE} -w ${BOOT} ${MDDEVICE} ${FSLABEL}
newfs -i ${FSINODE} -o space -m 0 /dev/${MDDEVICE}c
@@ -117,9 +120,6 @@ dofs_md () {
set `df -ki ${MNT} | tail -1`
- umount ${MNT}
- mdconfig -d -u ${MDDEVICE} 2>/dev/null || true
-
echo "*** Filesystem is ${FSSIZE} K, $4 left"
echo "*** ${FSINODE} bytes/inode, $7 left"
break;
OpenPOWER on IntegriCloud