summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-07-23 10:44:36 +0000
committerColin Watson <cjwatson@debian.org>2009-07-23 10:44:36 +0000
commitfda43dbccf4ee29e5bd58877e2a8543ce81becff (patch)
tree4159692d9a2ee88c0fef79f03b2741ae06d1f1e7
parent0d31f5faa4fc5ab0ca3a205bc2c4b856322107ac (diff)
downloaddebootstrap-fda43dbccf4ee29e5bd58877e2a8543ce81becff.tar.gz
On Linux, clear out /etc/mtab on exit if it's not a symlink. Should fix
problems Wouter Verhelst and Martin Michlmayr are seeing with initramfs-tools MODULES=dep, although it probably isn't a perfect solution. r59637
-rw-r--r--debian/changelog9
-rw-r--r--functions7
2 files changed, 16 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index aae3763..45eb133 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+debootstrap (1.0.15) UNRELEASED; urgency=low
+
+ * On Linux, clear out /etc/mtab on exit if it's not a symlink. Should fix
+ problems Wouter Verhelst and Martin Michlmayr are seeing with
+ initramfs-tools MODULES=dep, although it probably isn't a perfect
+ solution.
+
+ -- Colin Watson <cjwatson@debian.org> Thu, 23 Jul 2009 11:29:50 +0100
+
debootstrap (1.0.14) unstable; urgency=low
* Apply patch from Felix Zielcke <fzielcke@z-51.de> to use "dpkg
diff --git a/functions b/functions
index ae8fd3f..989fb6e 100644
--- a/functions
+++ b/functions
@@ -815,6 +815,12 @@ umount_on_exit () {
fi
}
+clear_mtab () {
+ if [ -f "$TARGET/etc/mtab" ] && [ ! -h "$TARGET/etc/mtab" ]; then
+ rm -f "$TARGET/etc/mtab"
+ fi
+}
+
setup_proc () {
case "$ARCH" in
kfreebsd-*)
@@ -838,6 +844,7 @@ setup_proc () {
umount "$TARGET/sys" 2>/dev/null || true
in_target mount -t sysfs sysfs /sys
fi
+ on_exit clear_mtab
;;
esac
umount_on_exit /lib/init/rw