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:
Jose Luis Duran
2026-01-17 18:03:00 +00:00
parent a4f0a60e05
commit 7106db625e
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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
}
+1 -1
View File
@@ -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}"