mklive: check if pseudofs exists before umounting it

This commit is contained in:
classabbyamp 2024-02-22 21:48:45 -05:00
parent 63c1152489
commit 9708d22136
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ mount_pseudofs() {
}
umount_pseudofs() {
for f in sys dev proc; do
if ! umount -R -f "$ROOTFS/$f"; then
if [ -d "$ROOTFS/$f" ] && ! umount -R -f "$ROOTFS/$f"; then
info_msg "ERROR: failed to unmount $ROOTFS/$f/"
return 1
fi