From: Daniel Hokka Zakrisson Date: Wed, 2 Dec 2009 11:13:49 +0000 (+0000) Subject: /proc/mounts is apparently writeable. X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=beb9603e6f1109c4b7022a34dfdae1b49f502954;hp=fa408b645f736a5f0c91880e787ac2438eed6d5a;p=util-vserver.git /proc/mounts is apparently writeable. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2869 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/scripts/vserver.functions b/scripts/vserver.functions index 2e8897e..626cd07 100644 --- a/scripts/vserver.functions +++ b/scripts/vserver.functions @@ -918,6 +918,10 @@ function _mountVserverInternal # magic regarding the mtab file; when etc/mtab can not be touched, # add the '-n' flag to mount test -w etc -o -w etc/mtab || xflag=-n + if test -h etc/mtab; then + local l=$($_READLINK etc/mtab) + test "${l##/proc/}" = "$l" || xflag=-n + fi "$@" $_SECURE_MOUNT -a $xflag --chroot --fstab "$fstab" --rootfs no popd >/dev/null }