Do not continue execution if provided mirror doesn't work
authorMichael Prokop <mika@grml.org>
Fri, 24 Jul 2009 07:46:21 +0000 (09:46 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 24 Jul 2009 07:46:21 +0000 (09:46 +0200)
debian/changelog
grml-debootstrap

index 294a63a..1b0d26d 100644 (file)
@@ -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 <mika@grml.org>  Wed, 08 Jul 2009 22:33:29 +0200
+ -- Michael Prokop <mika@grml.org>  Fri, 24 Jul 2009 09:44:58 +0200
 
 grml-debootstrap (0.28) unstable; urgency=low
 
index 8cafe54..5295be1 100755 (executable)
@@ -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."