diff --git a/xen-create-image b/xen-create-image index 7802bde..0d27445 100755 --- a/xen-create-image +++ b/xen-create-image @@ -402,7 +402,7 @@ Install an X11 server, using VNC and XDM -- http://www.steve.org.uk/ - $Id: xen-create-image,v 1.107 2006-03-20 17:51:10 radu Exp $ + $Id: xen-create-image,v 1.108 2006-03-28 07:19:42 steve Exp $ =cut @@ -763,6 +763,19 @@ print "\n\nRunning debootstrap to install the system. This will take a while!\ my $debootstrap = "debootstrap $CONFIG{'debootstrap'} $CONFIG{'dist'} $dir $CONFIG{'mirror'}"; runCommandWithProgress( $debootstrap ); +# +# Ensure the debootstrap command succeeded. +# +if ( ! -x $dir . "/usr/bin/apt-get" ) +{ + print "Something went wrong with the debootstrap installation\n"; + print "Aborting\n"; + + runCommand( "umount $dir" ); + exit; +} + + # # Copy the newly installed files from the virtual image to the host, @@ -1007,7 +1020,7 @@ sub parseCommandLineArguments if ( $VERSION ) { - my $REVISION = '$Revision: 1.107 $'; + my $REVISION = '$Revision: 1.108 $'; if ( $REVISION =~ /1.([0-9.]+) / ) {