nanobsd: Prefer nano_umount to umount
nano_umount[^1] is a convenience routine used to override issues with
umount(8) without changing the nanobsd.sh source code. There were a few
places where it was not being used.
[^1]: Introduced in 6d12b61a88 ("Add a routine for easy workaround any
umount issues w/o hacking nanobsd.sh.")
Reviewed by: imp, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48780
This commit is contained in:
@@ -812,7 +812,7 @@ cust_pkgng() {
|
||||
mount -t nullfs -o noatime -o ro ${NANO_PACKAGE_DIR} ${NANO_WORLDDIR}/_.p
|
||||
mount -t devfs devfs ${NANO_WORLDDIR}/dev
|
||||
|
||||
trap "umount ${NANO_WORLDDIR}/dev; umount ${NANO_WORLDDIR}/_.p ; rm -xrf ${NANO_WORLDDIR}/_.p" 1 2 15 EXIT
|
||||
trap "nano_umount ${NANO_WORLDDIR}/dev; nano_umount ${NANO_WORLDDIR}/_.p ; rm -xrf ${NANO_WORLDDIR}/_.p" 1 2 15 EXIT
|
||||
|
||||
# Install pkg-* package
|
||||
CR "${PKGCMD} add /_.p/${_NANO_PKG_PACKAGE}"
|
||||
@@ -837,8 +837,8 @@ cust_pkgng() {
|
||||
CR0 "${PKGCMD} info"
|
||||
|
||||
trap - 1 2 15 EXIT
|
||||
umount ${NANO_WORLDDIR}/dev
|
||||
umount ${NANO_WORLDDIR}/_.p
|
||||
nano_umount ${NANO_WORLDDIR}/dev
|
||||
nano_umount ${NANO_WORLDDIR}/_.p
|
||||
rm -xrf ${NANO_WORLDDIR}/_.p
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ create_code_slice() {
|
||||
-y ${NANO_HEADS}`
|
||||
fi
|
||||
|
||||
trap "echo 'Running exit trap code' ; df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT
|
||||
trap "echo 'Running exit trap code' ; df -i ${MNT} ; nano_umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT
|
||||
|
||||
gpart create -s bsd "${MD}"
|
||||
gpart add -t freebsd-ufs -b 16 "${MD}"
|
||||
|
||||
Reference in New Issue
Block a user