From: Michael Prokop Date: Fri, 24 Jul 2009 07:46:21 +0000 (+0200) Subject: Do not continue execution if provided mirror doesn't work X-Git-Tag: v0.29~2 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=85be47372c7b518782546307f72e9c60bad22861;hp=217234f891dc8ce775609cb3d773fc3fb3f6d968 Do not continue execution if provided mirror doesn't work --- diff --git a/debian/changelog b/debian/changelog index 294a63a..1b0d26d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,8 +20,12 @@ grml-debootstrap (0.29) UNRELEASED; urgency=low * Use ls for locating /dev/md* devices instead of echo so we don't have '/dev/md*' in the interactive partition dialog. * Do not display mountpoint if we are using the default one. + * Avoid duplicate 'Running ... on a directory, nothing to mount.' + message. + * Do not continue execution if provided mirror doesn't work. + [Closes: issue711] - -- Michael Prokop Wed, 08 Jul 2009 22:33:29 +0200 + -- Michael Prokop Fri, 24 Jul 2009 09:44:58 +0200 grml-debootstrap (0.28) unstable; urgency=low 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."