If mtab is write only and a symlink then assume it's linked to /proc/mounts

and don't try and update it. Fixes #185.
This commit is contained in:
Roy Marples 2009-07-20 19:47:08 +01:00
parent 7fbb6ad427
commit 29949a5496

View File

@ -12,6 +12,12 @@ depend()
start()
{
# /etc/mtab could be a symlink to /proc/mounts
if [ ! -w /etc/mtab -a -L /etc/mtab ]; then
eeinfo "Skipping mtab update (non writeable symlink)"
return 0
fi
ebegin "Updating /etc/mtab"
if ! echo 2>/dev/null >/etc/mtab; then
ewend 1 "/etc/mtab is not updateable"