diff options
author | Colin Watson <cjwatson@debian.org> | 2009-07-23 10:44:36 (GMT) |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2009-07-23 10:44:36 (GMT) |
commit | fda43dbccf4ee29e5bd58877e2a8543ce81becff (patch) | |
tree | 4159692d9a2ee88c0fef79f03b2741ae06d1f1e7 /functions | |
parent | 0d31f5faa4fc5ab0ca3a205bc2c4b856322107ac (diff) | |
download | debootstrap-fda43dbccf4ee29e5bd58877e2a8543ce81becff.zip debootstrap-fda43dbccf4ee29e5bd58877e2a8543ce81becff.tar.gz debootstrap-fda43dbccf4ee29e5bd58877e2a8543ce81becff.tar.bz2 |
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
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |