X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=cbd131abc4e0bf058f9bd2315fb80477f6312aa8;hp=2a36d4eefe1390c17339f70b44265ad5067165af;hb=cba387c584bdf456daae4d60a7213c0153cb3f84;hpb=e495c534be193f4f8d96d9f2d6bf40289b2c1c37 diff --git a/grml-debootstrap b/grml-debootstrap index 2a36d4e..cbd131a 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Die Jun 05 13:51:21 CEST 2007 [mika] +# Latest change: Die Jun 05 14:04:47 CEST 2007 [mika] ################################################################################ # http://www.debian.org/releases/stable/i386/index.html.en @@ -96,7 +96,7 @@ while [ "$#" -gt "0" ] ; do ;; -i|--iso) shift - [ -n "$MIRROR" ] && unset MIRROR + [ -n "$MIRROR" ] && unset MIRROR ISO=$1 ;; -h|--help) @@ -385,10 +385,19 @@ grub_install() { # unmount $MNTPOINRT {{{ umount_chroot() { - if [ -n "$PARTITION" ] ; then - einfo "Unmount $MNTPOINT" - umount $MNTPOINT - eend $? + if [ -n "$ISODIR" ] ; then + if grep -q "$ISODIR" /proc/mounts ; then + einfo "Unmount $MNTPOINT/$ISODIR" + umount "$MNTPOINT/$ISODIR" + eend $? + fi + fi + if grep -q "$PARTITION" /proc/mounts ; then + if [ -n "$PARTITION" ] ; then + einfo "Unmount $MNTPOINT" + umount $MNTPOINT + eend $? + fi fi } # }}}