1
0
mirror of synced 2026-01-20 09:34:58 +00:00
steve 9c102bc9ca 2006-09-11 16:14:37 by steve
BUGFIX:  vif=xxx, is broken - we only add the "," when using mac addresses
2006-09-11 16:14:37 +00:00

78 lines
1.0 KiB
Cheetah

#
# Configuration file for the Xen instance {$hostname}, created on
# { scalar localtime }.
#
#
# Kernel + memory size
#
kernel = '{$kernel}'
{ if ( $initrd )
{
$OUT.= "ramdisk = '$initrd'\n";
}
}
memory = '{$memory}'
#
# Disk device(s).
#
root = '/dev/{$device}1 ro'
{ if ( $noswap )
{
$OUT .= "disk = [ '$image_vbd,$device" . "1,w' ]";
}
else
{
$OUT .= "disk = [ '$image_vbd,$device" . "1,w', '$swap_vbd,$device" . "2,w' ]";
}
}
#
# Hostname
#
name = '{$hostname}'
#
# Networking
#
{ if ( $dhcp )
{
$OUT .= "dhcp = 'dhcp'\n";
# Setup the mac address, if present.
my $m = '';
if ( $mac )
{
$m = "mac=$mac"
}
$OUT .= "vif = [ '$m' ]";
}
else
{
#
# Setup the mac address, if present.
#
my $m = '';
if ( $mac )
{
$m = ",mac=$mac"
}
$OUT .= "vif = [ 'ip=$ip1";
$OUT .= "$m' ]";
}
}
#
# Behaviour
#
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'