From: Daniel Hokka Zakrisson Date: Tue, 20 Mar 2007 17:47:04 +0000 (+0000) Subject: Remove the guest in case of failure. X-Git-Tag: release-0.30.214~86 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5629cb5fc6c04aa3bc472a84a829bf6f32382f9c;p=util-vserver.git Remove the guest in case of failure. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2519 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/scripts/vserver-build.debootstrap b/scripts/vserver-build.debootstrap index dfbcc56..ebd9ca8 100644 --- a/scripts/vserver-build.debootstrap +++ b/scripts/vserver-build.debootstrap @@ -15,16 +15,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -function cleanUp -{ - test ! -d "$workdir" || $_RM -rf "$workdir" -} - function init { workdir= mirror= - trap "cleanUp" EXIT } function initVariables @@ -55,6 +49,8 @@ function findDebootstrap dir=$($_MKTEMPDIR -p /var/tmp debootstrap.XXXXXX) workdir=$dir dst=$dir/debootstrap.deb + + base._addGeneratedFile "$workdir" findFile DEBOOTSTRAP_URI "$__CONFDIR"/.defaults/apps/debootstrap/uri "$__PKGLIBDEFAULTDIR"/debootstrap.uri read tmp <$DEBOOTSTRAP_URI