From d37b7391d186bac0325841bffbe732c27742edae Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 2 Sep 2008 23:19:58 +0200 Subject: [PATCH] Make sure it works on target directories --- debian/changelog | 7 +++++++ grml-debootstrap | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 240c5ef..9d199f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +grml-debootstrap (0.21) unstable; urgency=low + + * Make sure it works on target directories also if they are + *not* mounted separately. Thanks for reporting, Tong. + + -- Michael Prokop Tue, 02 Sep 2008 23:19:05 +0200 + grml-debootstrap (0.20) unstable; urgency=low * Use root=UUID=... by default if possible to avoid possible diff --git a/grml-debootstrap b/grml-debootstrap index d7b0daa..6aefe5d 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -11,7 +11,7 @@ set -e # exit on any error # variables {{{ PN="$(basename $0)" -VERSION='0.20' +VERSION='0.21' MNTPOINT="/mnt/debootstrap.$$" # inside the chroot system locales might not be available, so use minimum: @@ -686,7 +686,7 @@ debootstrap_system() { if ! grep -q $MNTPOINT /proc/mounts ; then mount_target fi - if grep -q $MNTPOINT /proc/mounts ; then + if grep -q $MNTPOINT /proc/mounts || [ -n "$DIRECTORY" ] ; then einfo "Running $DEBOOTSTRAP for release ${RELEASE}${ARCHINFO} using ${MIRROR}${ISO}" [ -n "$MIRROR" ] && $DEBOOTSTRAP $ARCHCMD $RELEASE $MNTPOINT $MIRROR || \ $DEBOOTSTRAP $ARCHCMD $RELEASE $MNTPOINT $ISO -- 2.1.4