If /etc/mtab exists as a file, replace it with a symlink (Closes: #746570).

This commit is contained in:
Simon McVittie 2014-06-18 14:00:40 +01:00 committed by Daniel Baumann
parent 547f559343
commit 114a778b7a
1 changed files with 2 additions and 1 deletions

View File

@ -2,9 +2,10 @@
set -e set -e
# Create /etc/mtab symlink # Create /etc/mtab symlink, replacing a regular file if necessary
if [ ! -L /etc/mtab ] if [ ! -L /etc/mtab ]
then then
rm -f /etc/mtab
ln -s /proc/mtab /etc/mtab ln -s /proc/mtab /etc/mtab
fi fi