From 1bce9c9ec082cbbacd7132a3b92d6898973c2f53 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Thu, 30 Oct 2003 01:36:04 +0000 Subject: [PATCH] - 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/branches/SYSCALL_SWITCH@312 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/scripts/vserver | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/util-vserver/scripts/vserver b/util-vserver/scripts/vserver index 1a80cda..25d4555 100755 --- a/util-vserver/scripts/vserver +++ b/util-vserver/scripts/vserver @@ -287,7 +287,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/* @@ -406,10 +410,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