git://git.onelab.eu
/
build.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more masters
[build.git]
/
vbuild-init-vserver.sh
diff --git
a/vbuild-init-vserver.sh
b/vbuild-init-vserver.sh
index
24652a9
..
7dc7e41
100755
(executable)
--- a/
vbuild-init-vserver.sh
+++ b/
vbuild-init-vserver.sh
@@
-1,6
+1,5
@@
#!/bin/bash
# -*-shell-*-
#!/bin/bash
# -*-shell-*-
-# $Id$
#shopt -s huponexit
#shopt -s huponexit
@@
-83,7
+82,7
@@
EOF
function package_method () {
fcdistro=$1; shift
case $fcdistro in
function package_method () {
fcdistro=$1; shift
case $fcdistro in
- f[0-9]*|centos[0-9]*) echo yum ;;
+ f[0-9]*|centos[0-9]*
|sl[0-9]*
) echo yum ;;
lenny|etch) echo debootstrap ;;
*) echo Unknown distro $fcdistro ;;
esac
lenny|etch) echo debootstrap ;;
*) echo Unknown distro $fcdistro ;;
esac
@@
-177,10
+176,19
@@
function setup_vserver () {
# Set persistent for the network context
echo persistent,lback_allow > /etc/vservers/$vserver/nflags
# Set persistent for the network context
echo persistent,lback_allow > /etc/vservers/$vserver/nflags
+ # Set cflags
+ echo -e "persistent\n~info_init" > /etc/vservers/$vserver/cflags
+
+ # Enable cgroup
+ mkdir /etc/vservers/$vserver/cgroup
+
+ # Start Vserver automatically on boot
+ echo "default" > /etc/vservers/$vserver/apps/init/mark
+
# Set the init style of your vserver to plain for f13
# Set the init style of your vserver to plain for f13
- if [ "$fcdistro" == "f13" ] ; then
- echo plain > /etc/vservers/$vserver/apps/init/style
- fi
+ case $fcdistro in
+ f13|f14) echo plain > /etc/vservers/$vserver/apps/init/style ;;
+ esac
if [ "$pkg_method" = "yum" ] ; then
$personality vyum $vserver -- -y install yum
if [ "$pkg_method" = "yum" ] ; then
$personality vyum $vserver -- -y install yum