summaryrefslogtreecommitdiffstats
path: root/debootstrap
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2007-06-19 14:48:24 (GMT)
committerColin Watson <cjwatson@debian.org>2007-06-19 14:48:24 (GMT)
commit904ea1831b966ad4114f5853b86423f80c53c42e (patch)
treec0625247315de6f274890a8c6819d77ee3c59676 /debootstrap
parent6fec7fdb5b204ef9d34893f2481065cb4bdd5d26 (diff)
downloaddebootstrap-904ea1831b966ad4114f5853b86423f80c53c42e.zip
debootstrap-904ea1831b966ad4114f5853b86423f80c53c42e.tar.gz
debootstrap-904ea1831b966ad4114f5853b86423f80c53c42e.tar.bz2
* When removing $TARGET/debootstrap, debootstrap.log is still open as
stdout/stderr and needs to remain so, but after unlinking it some NFS servers implement this by a temporary file in the same directory, which makes it impossible to rmdir that directory. Moving it instead works around the problem (thanks, Steven McCoy; https://launchpad.net/bugs/65003). r47550
Diffstat (limited to 'debootstrap')
-rw-r--r--debootstrap10
1 files changed, 9 insertions, 1 deletions
diff --git a/debootstrap b/debootstrap
index 2c7b891..6adb15c 100644
--- a/debootstrap
+++ b/debootstrap
@@ -465,7 +465,15 @@ if am_doing_phase second_stage; then
fi
if [ -e $TARGET/debootstrap/debootstrap.log ]; then
- cp $TARGET/debootstrap/debootstrap.log $TARGET/var/log/bootstrap.log
+ if [ "$KEEP_DEBOOTSTRAP_DIR" = true ]; then
+ cp $TARGET/debootstrap/debootstrap.log $TARGET/var/log/bootstrap.log
+ else
+ # debootstrap.log is still open as stdout/stderr and needs to remain
+ # so, but after unlinking it some NFS servers implement this by a
+ # temporary file in the same directory, which makes it impossible to
+ # rmdir that directory. Moving it instead works around the problem.
+ mv $TARGET/debootstrap/debootstrap.log $TARGET/var/log/bootstrap.log
+ fi
fi
sync