summaryrefslogtreecommitdiffstats
path: root/iso2usb.sh
diff options
context:
space:
mode:
Diffstat (limited to 'iso2usb.sh')
-rw-r--r--iso2usb.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/iso2usb.sh b/iso2usb.sh
index 5a3d87d..2ae1171 100644
--- a/iso2usb.sh
+++ b/iso2usb.sh
@@ -556,7 +556,7 @@ rm ${USBMNT}/boot/extlinux/isolinux.*
/sbin/extlinux --install ${USBMNT}/boot/extlinux
# No longer needed:
-/sbin/umount ${USBMNT}
+if /sbin/mount |grep -qw ${USBMNT} ; then /sbin/umount ${USBMNT} ; fi
if [ $EFIBOOT -eq 1 ]; then
# Mount the EFI partition and copy /EFI as well as /boot directories into it:
@@ -570,8 +570,8 @@ if [ $EFIBOOT -eq 1 ]; then
fi
# No longer needed:
-/sbin/umount ${USBMNT}
-/sbin/umount ${EFIMNT}
+if /sbin/mount |grep -qw ${USBMNT} ; then /sbin/umount ${USBMNT} ; fi
+if /sbin/mount |grep -qw ${EFIMNT} ; then /sbin/umount ${EFIMNT} ; fi
# Unmount/remove stuff:
cleanup