From beb9603e6f1109c4b7022a34dfdae1b49f502954 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Wed, 2 Dec 2009 11:13:49 +0000 Subject: [PATCH 1/1] /proc/mounts is apparently writeable. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2869 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- scripts/vserver.functions | 4 ++++ 1 file changed, 4 insertions(+) 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 } -- 1.8.1.5