diff options
| author | Jose Luis Duran <jlduran@FreeBSD.org> | 2026-01-17 18:03:00 +0000 |
|---|---|---|
| committer | Jose Luis Duran <jlduran@FreeBSD.org> | 2026-01-17 18:03:00 +0000 |
| commit | 7106db625ece3cb48c5993686c74553993b9431a (patch) | |
| tree | 5208501b9c5be856562f6cb7d6dbb91dff21330f | |
| parent | a4f0a60e05293f3f517324f3ebc41046a79a9feb (diff) | |
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 6d12b61a88a6 ("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
| -rwxr-xr-x | tools/tools/nanobsd/defaults.sh | 6 | ||||
| -rw-r--r-- | tools/tools/nanobsd/legacy.sh | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 588758154c98..57be7a10f521 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -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 } diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index cbe56d6f560c..5ba2d81c6017 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -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}" |
