1
0
mirror of synced 2026-02-21 06:15:04 +00:00

2007-09-04 21:05:11 by steve

Allow the disk device to come from the environment
This commit is contained in:
steve
2007-09-04 21:05:11 +00:00
parent 08ec2265b6
commit 6a4964c0bd

View File

@@ -103,7 +103,7 @@ xt-create-config - Create a Xen configuration file for a new guest
--
http://www.steve.org.uk/
$Id: xt-create-xen-config,v 1.43 2007-07-31 17:33:30 steve Exp $
$Id: xt-create-xen-config,v 1.44 2007-09-04 21:05:11 steve Exp $
=cut
@@ -230,7 +230,7 @@ sub parseCommandLineArguments
if ( $VERSION )
{
my $REVISION = '$Revision: 1.43 $';
my $REVISION = '$Revision: 1.44 $';
if ( $REVISION =~ /1.([0-9.]+) / )
{
$REVISION = $1;
@@ -355,6 +355,16 @@ sub createXenConfig
{
$device = 'hda';
}
else if ( defined( $ENV{'disk_device'} ) )
{
$device = $ENV{'disk_device'};
# strip /dev/, if present.
if ( $device =~ /^(.*)\/(.*)$/ )
{
$device = $2;
}
}
$ENV{'device'} = $device;