X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=5295be11c83a3fb81704db1fc4d5e2173431f7f9;hp=8cafe546901fa27ce27e7e128b74575079a19f99;hb=85be47372c7b518782546307f72e9c60bad22861;hpb=217234f891dc8ce775609cb3d773fc3fb3f6d968;ds=sidebyside diff --git a/grml-debootstrap b/grml-debootstrap index 8cafe54..5295be1 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -759,17 +759,18 @@ mount_target() { # install main chroot {{{ debootstrap_system() { - if ! grep -q "$MNTPOINT" /proc/mounts ; then - mount_target - fi if [ "$_opt_nodebootstrap" ]; then einfo "Skipping debootstrap as requested." return fi + if grep -q "$MNTPOINT" /proc/mounts || [ -n "$DIRECTORY" ] ; then einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${MIRROR}${ISO}" - [ -n "$MIRROR" ] && $DEBOOTSTRAP $ARCHCMD $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR || \ - $DEBOOTSTRAP $ARCHCMD $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $ISO + if [ -n "$MIRROR" ] ; then + $DEBOOTSTRAP $ARCHCMD $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR + else + $DEBOOTSTRAP $ARCHCMD $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $ISO + fi eend $? else eerror "Error: $MNTPOINT not mounted, can not continue."