From a28bced5e31b2cc57fb682e1f4aef0b62128ff60 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Tue, 9 Dec 2008 14:02:04 +0000 Subject: [PATCH] Last juggle. --- etc/xm.tmpl | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/etc/xm.tmpl b/etc/xm.tmpl index c983165..0e93278 100644 --- a/etc/xm.tmpl +++ b/etc/xm.tmpl @@ -50,24 +50,29 @@ memory = '{$memory}' # Physical volumes # { + if ( ( $swap_vbd ) && ( $image_vbd ) ) + { $OUT .= "root = '/dev/$device" . "2 ro'\n"; $OUT .= "disk = [ "; - if ( $swap_vbd ) - { - $OUT .= "'$swap_vbd," . $device . "1,w'"; - } if ( $image_vbd ) { - if ( $swap_vbd ) - { - $OUT .= ","; - } $OUT .= "'$image_vbd," . $device . "2,w'"; } + + if ( $swap_vbd ) + { + if ( $image_vbd ) + { + $OUT .= ","; + } + + $OUT .= "'$swap_vbd," . $device . "1,w'"; + } $OUT .= " ]\n"; + } }