From 29949a549609100bbc659054e5381c94386ac561 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 20 Jul 2009 19:47:08 +0100 Subject: 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. --- init.d/mtab.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'init.d') diff --git a/init.d/mtab.in b/init.d/mtab.in index eb9744d6..80a5ad18 100644 --- a/init.d/mtab.in +++ b/init.d/mtab.in @@ -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" -- cgit v1.2.3