- reenabled the copy-all mode; can be disabled by setting the
[util-vserver.git] / util-vserver / scripts / vserver
index 1a80cda..25d4555 100755 (executable)
@@ -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