From: Enrico Scholz Date: Wed, 11 Feb 2004 23:39:06 +0000 (+0000) Subject: made namespace stuff configurable at a global place X-Git-Tag: VERSION_0_10~678 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=720d7e009dd68fd52d1817e3a645566ef9d99a65;p=util-vserver.git made namespace stuff configurable at a global place git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@879 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/scripts/vserver.functions b/util-vserver/scripts/vserver.functions index 94f59e4..a86303a 100644 --- a/util-vserver/scripts/vserver.functions +++ b/util-vserver/scripts/vserver.functions @@ -436,6 +436,13 @@ function generateOptions _generateChcontextOptions "$1" } +function _isAvoidNamespace +{ + test ! -e "$1"/namespace || return 1 + test -e "$CONFDIR"/.defaults/nonamespace -o \ + -e "$1"/nonamespace +} + function mountVserver { local cfgdir=$1 @@ -455,7 +462,7 @@ function mountVserver $_CHBIND "${CHBIND_OPTS[@]}" \ $_SECURE_MOUNT -a --chroot "$vdir" --fstab "$cfgdir"/fstab - test -e "$cfgdir"/nonamespace || \ + _isAvoidNamespace "$cfgdir" || \ $_SECURE_MOUNT --rbind -n "$vdir" "/" } @@ -466,9 +473,9 @@ function umountVserver is_ok=1 - test -e "$cfgdir"/nonamespace || return 0 - test -e "$cfgdir"/fstab || return 0 - test "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$cfgdir" + _isAvoidNamespace "$cfgdir" || return 0 + test -e "$cfgdir"/fstab || return 0 + test "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$cfgdir" pushd "$vdir/" >/dev/null tac "$cfgdir"/fstab | while read src dst tmp; do