From 801abd658248d3c7e4d2489c48601295787a90fe Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Thu, 30 Oct 2003 17:42:44 +0000 Subject: [PATCH] merged from 0.23.95: - reenabled the copy-all mode; can be disabled by setting the $UTIL_VSERVER_AVOID_COPY environment variable - use '-HS' ulimit switch for newly created vservers git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@346 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/scripts/vserver-legacy | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/util-vserver/scripts/vserver-legacy b/util-vserver/scripts/vserver-legacy index 28f07a3..5342cd9 100755 --- a/util-vserver/scripts/vserver-legacy +++ b/util-vserver/scripts/vserver-legacy @@ -282,7 +282,11 @@ elif [ "$2" = "build" ] ; then fi mkdir -p /vservers/$1 || exit 1 chmod 755 /vservers/$1 - mkdir -p /vservers/$1/{etc/rc.d/init.d,sbin,var/run,var/log} + if test "$UTIL_VSERVER_AVOID_COPY"; then + mkdir -p /vservers/$1/{etc/rc.d/init.d,sbin,var/run,var/log} + else + cp -ax /sbin /bin /etc /usr /var /lib /vservers/$1/. || exit 1 + fi cd /vservers/$1 || exit 1 rm -fr lib/modules/* rm -f var/spool/mail/* @@ -401,10 +405,10 @@ S_NICE= S_FLAGS="lock nproc" # You can set various ulimit flags and they will be inherited by the # vserver. You enter here various command line argument of ulimit -# ULIMIT="-H -u 200" +# ULIMIT="-HS -u 200" # The example above, combined with the nproc S_FLAGS will limit the # vserver to a maximum of 200 processes -ULIMIT="-H -u 1000" +ULIMIT="-HS -u 1000" # You can set various capabilities. By default, the vserver are run # with a limited set, so you can let root run in a vserver and not # worry about it. He can't take over the machine. In some cases -- 1.8.1.5