aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'init.d')
-rw-r--r--init.d/mtab.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/init.d/mtab.in b/init.d/mtab.in
index e741bc1c..23a5e7d9 100644
--- a/init.d/mtab.in
+++ b/init.d/mtab.in
@@ -12,9 +12,10 @@ depend()
start()
{
- # /etc/mtab could be a symlink to /proc/mounts
- if [ ! -w /etc/mtab -a -L /etc/mtab ]; then
- einfo "Skipping mtab update (non writeable symlink)"
+ # /etc/mtab could be a symlink to a location in /proc
+ if readlink -f /etc/mtab | grep -sq '^/proc/\(self\|[0-9]\+\)/mounts$'
+ then
+ einfo "Skipping mtab update (link points to location in /proc)"
return 0
fi