X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=68d88248120144d8b3e3bb75830e8af1017211ac;hp=01fcfe89f9e02c4c0e77e9ba2092ee2a5adea308;hb=666902fa1edae45c1018433d24e9af026c831372;hpb=1a8351e9b67917b67e235e027c7403b1273f1e86 diff --git a/grml-debootstrap b/grml-debootstrap index 01fcfe8..68d8824 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 13:51:21 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 @@ -168,6 +168,7 @@ case $ISO in ISO=file:$1 ;; esac +ISODIR=${ISO##file:} # provide variables to chroot system touch /etc/debootstrap/variables @@ -202,7 +203,7 @@ bailout(){ [ -x "$MNTPOINT"/bin/umount ] && chroot "$MNTPOINT" umount -a 1>/dev/null 2>&1 [ -x "$MNTPOINT"/bin/umount ] && chroot "$MNTPOINT" umount /proc 1>/dev/null 2>&1 [ -x "$MNTPOINT"/bin/umount ] && chroot "$MNTPOINT" umount /proc 1>/dev/null 2>&1 - [ -d "$TARGET/$ISO" ] && umount "$TARGET/$ISO" + [ -d "$MNTPOINT/$ISODIR" ] && umount "$MNTPOINT/$ISODIR" 1>/dev/null 2>&1 einfo "Unmounting $MNTPOINT" ; umount "$MNTPOINT" ; eend $? fi fi @@ -296,9 +297,9 @@ mount_target() { eend $? fi fi - if [ -n "$ISO" ] ; then - mkdir "$TARGET/$ISO" - mount --bind "$ISO" "$TARGET/$ISO" + if [ -n "$ISODIR" ] ; then + mkdir -p "$MNTPOINT/$ISODIR" + mount --bind "$ISODIR" "$MNTPOINT/$ISODIR" fi } # }}}