]> gitweb.fluxo.info Git - puppet-virtual.git/commitdiff
Changing the way packages are installed ad build_vserver
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 8 Jan 2012 21:15:28 +0000 (19:15 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 8 Jan 2012 21:15:28 +0000 (19:15 -0200)
files/vserver/build_vserver

index 1d9d6fecf3a406659cc4479b5f121b6d38d11bb5..3f606ba1ac7b24588e052bb03849fb5c73cb036d 100644 (file)
@@ -6,6 +6,7 @@ RELEASE="$3"
 DEBOOTSTRAP_MIRROR="$4"
 VHOSTNAME="$5"
 VINTERFACE="$6"
+PACKAGES="lsb-release openssl iproute cron sudo openssh-server locales"
 
 if [ "$VHOSTNAME" != "none" ]; then
   VHOSTNAME_OPT="--hostname $VHOSTNAME"
@@ -18,7 +19,8 @@ fi
 
 # create basic vserver
 vserver $NAME build -n $NAME --context $CONTEXT \
-        $VHOSTNAME_OPT $VINTERFACE_OPT -m debootstrap -- -d $RELEASE -m $DEBOOTSTRAP_MIRROR || exit 1
+        $VHOSTNAME_OPT $VINTERFACE_OPT -m debootstrap -- \
+        -d $RELEASE -m $DEBOOTSTRAP_MIRROR --include=$PACKAGES || exit 1
 
 # copy in some some defaults
 TARGET=/etc/vservers/$NAME/vdir/
@@ -39,9 +41,6 @@ vserver $NAME start                || exit 1
 vserver $NAME exec apt-get update  || exit 1
 vserver $NAME exec apt-get upgrade || exit 1
 
-# Install a few needed packages
-vserver $NAME exec apt-get -y install lsb-release openssl iproute cron sudo openssh-server locales || exit 1
-
 #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" >&2