Skip to content

Commit

Permalink
debootstrap from an ISO when ISO is set as MIRROR is always set
Browse files Browse the repository at this point in the history
previously the ISO codepath was never executed as MIRROR was always set
and thus -n "$MIRROR" was never false

do NOT unset MIRROR in the ISO case so that the resulting chroot has a
proper mirror configured
  • Loading branch information
evgeni committed Aug 1, 2012
1 parent 6f8ba91 commit ab690ec
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions grml-debootstrap
Expand Up @@ -1041,15 +1041,16 @@ debootstrap_system() {
eend 1 ; exit 1
fi

einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${MIRROR}${ISO}"
if [ -n "$MIRROR" ] ; then
einfo "Executing: $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR"
$DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR
RC=$?
else
if [ -n "$ISO" ] ; then
einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${ISO}"
einfo "Executing: $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $ISO"
$DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $ISO
RC=$?
else
einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${MIRROR}"
einfo "Executing: $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR"
$DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR
RC=$?
fi

if [ $RC -ne 0 ] ; then
Expand Down

0 comments on commit ab690ec

Please sign in to comment.