From 114a778b7a8e7641fcae4ba971e73067ed90eb12 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 18 Jun 2014 14:00:40 +0100 Subject: If /etc/mtab exists as a file, replace it with a symlink (Closes: #746570). --- share/hooks/0020-create-mtab-symlink.hook.chroot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'share') 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 -- cgit v1.2.3