diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-08-15 21:58:17 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-08-15 21:58:17 -0300 |
commit | 30ad2d163277554f341904dc5ee2481b18a33543 (patch) | |
tree | 25e3ced7724b70fecdb36bb344ad696e641af82e | |
parent | 470086aec3cd0cb83ae836d51c1a7799492a1639 (diff) | |
download | puppet-virtual-30ad2d163277554f341904dc5ee2481b18a33543.tar.gz puppet-virtual-30ad2d163277554f341904dc5ee2481b18a33543.tar.bz2 |
Abort build_vserver on error
-rw-r--r-- | files/vserver/build_vserver | 10 |
1 files 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 |