diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-06-18 14:00:40 +0100 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2014-06-25 20:52:08 +0200 |
commit | 114a778b7a8e7641fcae4ba971e73067ed90eb12 (patch) | |
tree | a61560cb43a48c7580f2023e354cffc8ecf85612 | |
parent | 547f5593436f05696c6dffc8f405b53bad4281ce (diff) | |
download | vyos-live-build-114a778b7a8e7641fcae4ba971e73067ed90eb12.tar.gz vyos-live-build-114a778b7a8e7641fcae4ba971e73067ed90eb12.zip |
If /etc/mtab exists as a file, replace it with a symlink (Closes: #746570).
-rwxr-xr-x | share/hooks/0020-create-mtab-symlink.hook.chroot | 3 |
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 |