2006-06-21 08:31:00 by steve
Test that the specified --kernel and --initrd files exist.
This commit is contained in:
@@ -432,7 +432,7 @@ Install an X11 server, using VNC and XDM
|
||||
--
|
||||
http://www.steve.org.uk/
|
||||
|
||||
$Id: xen-create-image,v 1.37 2006-06-20 23:06:05 steve Exp $
|
||||
$Id: xen-create-image,v 1.38 2006-06-21 08:31:00 steve Exp $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -844,7 +844,7 @@ sub parseCommandLineArguments
|
||||
|
||||
if ( $VERSION )
|
||||
{
|
||||
my $REVISION = '$Revision: 1.37 $';
|
||||
my $REVISION = '$Revision: 1.38 $';
|
||||
|
||||
if ( $REVISION =~ /1.([0-9.]+) / )
|
||||
{
|
||||
@@ -947,6 +947,30 @@ E_OR
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# The kernel + initrd images should exist.
|
||||
#
|
||||
if ( defined( $CONFIG{'kernel'} ) &&
|
||||
length( $CONFIG{'kernel'} ) &&
|
||||
! -e $CONFIG{'kernel'} )
|
||||
{
|
||||
print "The kernel image we're trying to use does not exist.\n";
|
||||
print "The image is - $CONFIG{'kernel'}\n";
|
||||
print "Aborting\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( defined( $CONFIG{'initrd'} ) &&
|
||||
length( $CONFIG{'initrd'} ) &&
|
||||
! -e $CONFIG{'initrd'} )
|
||||
{
|
||||
print "The initial ramdisk we're trying to use does not exist.\n";
|
||||
print "The image is - $CONFIG{'initrd'}\n";
|
||||
print "Aborting\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user