X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=990566ff7d9554ccfe4b9f5cd3d1cf23dd9cdf6f;hp=27955fb3e515e0dcfbd515522de7d7ce8638094c;hb=1bbb415e599ec0be1c188584f779bf40f3c13ad7;hpb=7fa7bc52d0bbcf9a4751cd9a4c5aca95b0c5b4a7 diff --git a/grml-debootstrap b/grml-debootstrap index 27955fb..990566f 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -4,13 +4,13 @@ # 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: Mon Apr 16 20:39:13 CEST 2007 [mika] +# Latest change: Die Jun 05 14:02:22 CEST 2007 [mika] ################################################################################ # http://www.debian.org/releases/stable/i386/index.html.en set -e # exit on any error -VERSION='0.9' +VERSION='0.10' # source core functions {{{ . /etc/grml/lsb-functions @@ -178,6 +178,7 @@ chmod 600 /etc/debootstrap/variables # make sure nobody except root can read it [ -n "$GROOT" ] && echo "GROOT=$GROOT" >> /etc/debootstrap/variables [ -n "$TARGET" ] && echo "TARGET=$TARGET" >> /etc/debootstrap/variables [ -n "$ISO" ] && echo "ISO=$ISO" >> /etc/debootstrap/variables +[ -n "$ISODIR" ] && echo "ISODIR=$ISO" >> /etc/debootstrap/variables [ -n "$MIRROR" ] && echo "MIRROR=$MIRROR" >> /etc/debootstrap/variables [ -n "$MIRROR" ] && echo "CHROOTMIRROR=$MIRROR" >> /etc/debootstrap/variables [ -n "$ROOTPASSWORD" ] && echo "ROOTPASSWORD=$ROOTPASSWORD" >> /etc/debootstrap/variables @@ -298,8 +299,10 @@ mount_target() { fi fi if [ -n "$ISODIR" ] ; then + einfo "Mounting Debian image loopback to $MNTPOINT/$ISODIR." mkdir -p "$MNTPOINT/$ISODIR" mount --bind "$ISODIR" "$MNTPOINT/$ISODIR" + eend $? fi } # }}} @@ -382,6 +385,11 @@ grub_install() { # unmount $MNTPOINRT {{{ umount_chroot() { + if [ -n "$ISODIR" ] ; then + einfo "Unmount $MNTPOINT/$ISODIR" + umount "$MNTPOINT/$ISODIR" + eend $? + fi if [ -n "$PARTITION" ] ; then einfo "Unmount $MNTPOINT" umount $MNTPOINT