summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 e741bc1..23a5e7d 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