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:
parent
7fbb6ad427
commit
29949a5496
@ -12,6 +12,12 @@ depend()
|
|||||||
|
|
||||||
start()
|
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"
|
ebegin "Updating /etc/mtab"
|
||||||
if ! echo 2>/dev/null >/etc/mtab; then
|
if ! echo 2>/dev/null >/etc/mtab; then
|
||||||
ewend 1 "/etc/mtab is not updateable"
|
ewend 1 "/etc/mtab is not updateable"
|
||||||
|
Loading…
Reference in New Issue
Block a user