From 30ad2d163277554f341904dc5ee2481b18a33543 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 15 Aug 2011 21:58:17 -0300 Subject: Abort build_vserver on error --- files/vserver/build_vserver | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/files/vserver/build_vserver b/files/vserver/build_vserver index 11d38ed..ddf37e0 100644 --- a/files/vserver/build_vserver +++ b/files/vserver/build_vserver @@ -17,7 +17,7 @@ fi # create basic vserver vserver $NAME build -n $NAME --context $CONTEXT \ - $VHOSTNAME $VINTERFACE -m debootstrap -- -d $RELEASE -m $DEBOOTSTRAP_MIRROR + $VHOSTNAME $VINTERFACE -m debootstrap -- -d $RELEASE -m $DEBOOTSTRAP_MIRROR || exit 1 # copy in some some defaults TARGET=/etc/vservers/$NAME/vdir/ @@ -32,12 +32,12 @@ echo "127.0.0.1 $NAME" > $TARGET/etc/hosts #cp /var/lib/puppet/modules/dbp/puppet_current.deb $TARGET/var/lib/puppet/modules/dbp/ # Setup is complete, now do the post-install stuff -vserver $NAME start -vserver $NAME exec apt-get update -vserver $NAME exec apt-get upgrade +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 iproute cron sudo openssh-server locales +vserver $NAME exec apt-get -y install lsb-release 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 -- cgit v1.2.3