# $Id: vserver-setup.functions 2517 2007-03-18 22:02:22Z dhozac $ --*- sh -*-- # Copyright (C) 2003,2004,2005,2006 Enrico Scholz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. SETUP_HOSTNAME= SETUP_NETDEV= SETUP_NETMASK= SETUP_NETPREFIX= SETUP_NETBCAST= SETUP_LOCKFILE= SETUP_CONFDIR= SETUP_CONTEXT= SETUP_INITSTYLE= SETUP_CPUSET= SETUP_CPUSETCPUS= SETUP_CPUSETMEMS= SETUP_CPUSETVIRT= declare -a SETUP_INTERFACES=() declare -a SETUP_FLAGS=() declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:,cpuset:,cpusetcpus:,cpusetmems:,cpusetvirt" declare -r SETUP_HELPMSG=$" --context ... the static context of the vserver [default: none; one will be generated for you] --confdir ... [default: $__CONFDIR/] --lockfile ... [default: $__RUNDIR/] --hostname --netdev --netbcast --netmask |--netprefix ... sets the default netmask (a.b.c.d quadruple) or prefixlen (length of the interface) --interface [=][:][/] ... declares an network-interface; this option can be specified multiple times --flags + ... sets comma-separated list of flags; possible flags are lock: Prevent the vserver from setting new security context sched: Merge scheduler priority of all processes in the vserver so that it acts a like a single one (kernel 2.4 only). nproc: Limit the number of processes in the vserver according to ulimit (instead of a per user limit, this becomes a per vserver limit) private: No other process can join this security context. Even root --cpuset ... declares the CPUSET this vserver will run in [default: none] --cpusetcpus ]> ... sets which cpus belong to the CPUSET, exclusive is a flag (0|1) prohibiting any other cpuset from using those cpus --cpusetmems ]> ... sets which memory pools belong to the CPUSET, exclusive is a flag (0|1) prohibiting any other cpuset from using those memory pools --cpusetvirt ... virtualize cpuset (guest will see only CPUs defined in cpuset) Requires kernel patch from http://www.bullopensource.org/cpuset/ --initstyle