summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hooks/0020-create-mtab-symlink.hook.chroot3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/hooks/0020-create-mtab-symlink.hook.chroot b/share/hooks/0020-create-mtab-symlink.hook.chroot
index 0cae147b0..68587a5f6 100755
--- a/share/hooks/0020-create-mtab-symlink.hook.chroot
+++ b/share/hooks/0020-create-mtab-symlink.hook.chroot
@@ -2,9 +2,10 @@
set -e
-# Create /etc/mtab symlink
+# Create /etc/mtab symlink, replacing a regular file if necessary
if [ ! -L /etc/mtab ]
then
+ rm -f /etc/mtab
ln -s /proc/mtab /etc/mtab
fi