diff options
author | Pietro Ferrari <pietro@riseup.net> | 2008-11-11 00:16:41 +0000 |
---|---|---|
committer | Pietro Ferrari <pietro@riseup.net> | 2008-11-11 00:16:41 +0000 |
commit | b43b2a2d5b0c424f3fce801f9158af60df20978a (patch) | |
tree | b1e48d613ee0d76a686a83c2ccdec4f769060c89 /files/build_vserver | |
parent | 0a4679409748b22f464526ec2c4aad1771c80b80 (diff) | |
download | puppet-virtual-b43b2a2d5b0c424f3fce801f9158af60df20978a.tar.gz puppet-virtual-b43b2a2d5b0c424f3fce801f9158af60df20978a.tar.bz2 |
merge some changes from immerda repository. specially xen related.
Diffstat (limited to 'files/build_vserver')
-rwxr-xr-x | files/build_vserver | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/files/build_vserver b/files/build_vserver index bf4b949..16f6528 100755 --- a/files/build_vserver +++ b/files/build_vserver @@ -1,13 +1,15 @@ #!/bin/bash NAME=$1 -DOMAIN=$2 - +CONTEXT=$2 +RELEASE = $3 +DEBOOTSTRAP_MIRROR = $4 # create basic vserver -vserver $NAME build -m debootstrap -- -d etch -m http://ftp.at.debian.org/debian +vserver $NAME build -m debootstrap -- -d $RELEASE -m $DEBOOTSTRAP_MIRROR # default settings echo $NAME >/etc/vservers/$NAME/uts/nodename +echo $CONTEXT >/etc/vservers/$NAME/context # copy in some some defaults TARGET=/etc/vservers/$NAME/vdir/ @@ -17,7 +19,7 @@ cp /etc/apt/{preferences,sources.list} $TARGET/etc/apt/ # this is needed so puppet can find the puppetmaster and creates the right # certificate grep -v $NAME /etc/hosts > $TARGET/etc/hosts -echo "127.0.0.1 $NAME.$DOMAIN $NAME" >> $TARGET/etc/hosts +echo "127.0.0.1 $NAME" >> $TARGET/etc/hosts mkdir -p $TARGET/var/lib/puppet/modules/dbp cp /var/lib/puppet/modules/dbp/puppet_current.deb $TARGET/var/lib/puppet/modules/dbp/ @@ -29,4 +31,4 @@ vserver $NAME exec apt-get -y install lsb-release iproute vserver $NAME exec dpkg --install var/lib/puppet/modules/dbp/puppet_current.deb vserver $NAME exec apt-get -fy install -echo "Please sign now: puppetca --sign $NAME.$DOMAIN" >&2 +echo "Please sign now: puppetca --sign $NAME" >&2 |