diff options
author | Roy Marples <roy@marples.name> | 2009-07-20 19:47:08 +0100 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-07-20 19:47:08 +0100 |
commit | 29949a549609100bbc659054e5381c94386ac561 (patch) | |
tree | 29834f3ebc7bf25a362d3918b43b2c396109472f | |
parent | 7fbb6ad42742ebc5e6ec244eedc85e9ac0a6236d (diff) |
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.
-rw-r--r-- | init.d/mtab.in | 6 |
1 files changed, 6 insertions, 0 deletions
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" |