Do not try to create /etc/debootstrap if it already exists
authorMichael Prokop <mika@grml.org>
Wed, 8 Jul 2009 00:08:14 +0000 (02:08 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 8 Jul 2009 00:08:14 +0000 (02:08 +0200)
debian/changelog
grml-debootstrap

index fc1b51f..a2826cd 100644 (file)
@@ -12,8 +12,10 @@ grml-debootstrap (0.29) UNRELEASED; urgency=low
     mydestination defaults to "$myhostname, localhost.$mydomain, localhost",
     myhostname defaults to gethostname() and mydomain to localdomain.
   * Slightly improve wording of -t and -p options.
     mydestination defaults to "$myhostname, localhost.$mydomain, localhost",
     myhostname defaults to gethostname() and mydomain to localdomain.
   * Slightly improve wording of -t and -p options.
+  * Do not try to create /etc/debootstrap if it already exists (which
+    might be the case when installing to a directory).
 
 
- -- Michael Prokop <mika@grml.org>  Wed, 08 Jul 2009 02:05:44 +0200
+ -- Michael Prokop <mika@grml.org>  Wed, 08 Jul 2009 02:07:01 +0200
 
 grml-debootstrap (0.28) unstable; urgency=low
 
 
 grml-debootstrap (0.28) unstable; urgency=low
 
index 64b46d5..0d2efbb 100755 (executable)
@@ -779,7 +779,7 @@ preparechroot() {
 
   cp $VERBOSE $CONFFILES/chroot-script $MNTPOINT/bin/chroot-script
   chmod 755 $MNTPOINT/bin/chroot-script
 
   cp $VERBOSE $CONFFILES/chroot-script $MNTPOINT/bin/chroot-script
   chmod 755 $MNTPOINT/bin/chroot-script
-  mkdir $MNTPOINT/etc/debootstrap/
+  [ -d "$MNTPOINT"/etc/debootstrap/ ] || mkdir "$MNTPOINT"/etc/debootstrap/
 
   # make sure we have our files for later use via chroot-script
   cp $VERBOSE $CONFFILES/config    $MNTPOINT/etc/debootstrap/
 
   # make sure we have our files for later use via chroot-script
   cp $VERBOSE $CONFFILES/config    $MNTPOINT/etc/debootstrap/