summaryrefslogtreecommitdiffstats
path: root/iso2usb.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-04-15 12:47:31 +0200
committer Eric Hameleers <alien@slackware.com>2016-04-15 12:47:31 +0200
commit367bbd16d5cabb7da52f863ae78cf66c4d45e046 (patch)
treee6485a51eb196919d1e6cd80245553a85e9573b7 /iso2usb.sh
parentd0f3ed8fe2e08ecb1cf38f4e896086a2ea41e13f (diff)
downloadliveslak-367bbd16d5cabb7da52f863ae78cf66c4d45e046.tar.gz
liveslak-367bbd16d5cabb7da52f863ae78cf66c4d45e046.tar.xz
iso2usb.sh: only umount if the directory was actually mounted.
Diffstat (limited to '')
-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