1
0
mirror of synced 2026-04-25 20:11:20 +00:00

Attempt to fixup image-dev

This commit is contained in:
Steve Kemp
2008-11-23 13:13:38 +00:00
parent aa7a2c4c5e
commit 97d01456a3

View File

@@ -21,7 +21,7 @@ memory = '{$memory}'
#
# Disk device(s).
#
{
{
for ( my $i = 0; $i <= $#PARTITIONS; $i++ )
{
if ( $PARTITIONS[$i]{'mountpoint'} eq '/' )
@@ -37,6 +37,26 @@ memory = '{$memory}'
$OUT .= " ]\n";
}
#
# Physical volumes
#
{
if ( $image_vbd )
{
$OUT .= "root = '/dev/$image-dev ro'\n";
$OUT .= "disk = [ '$image_vbd,sda1,w' ";
}
if ( $swap_vbd )
{
$OUT .= ", '$swap_vbd,sda2,w'";
}
if ( $imag_vbd )
{
$OUT .= " ]\n";
}
}
#
# Hostname
#
@@ -52,12 +72,12 @@ name = '{$hostname}'
# Setup the mac address, if present.
my $m = '';
if ( $mac )
{
{
$m = "mac=$mac"
}
$OUT .= "vif = [ '$m' ]";
}
}
else
{
#
@@ -65,11 +85,11 @@ name = '{$hostname}'
#
my $m = '';
if ( $mac )
{
{
$m = ",mac=$mac"
}
$OUT .= "vif = [ 'ip=$ip1";
$OUT .= "vif = [ 'ip=$ip1";
$OUT .= "$m' ]";
}
}