From 80d002d8a81e50b8880076fe80b45b82a8b4af4e Mon Sep 17 00:00:00 2001 From: Dmitry Nedospasov Date: Mon, 30 Aug 2010 22:23:58 +0200 Subject: [PATCH] swap-dev or noswap must be set with image-dev --- bin/xen-create-image | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index 3fc8b1d..2147a74 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -2106,11 +2106,21 @@ EOF exit 127; } - if ( $CONFIG{ 'image-dev' } && $CONFIG{ 'partitions' } ) + if ( $CONFIG{ 'image-dev' } ) { - logprint("Please choose either image-dev or partitions, not both!\n"); - $FAIL = 1; - exit 127; + if ( $CONFIG{ 'partitions' } ) + { + logprint("Please choose either image-dev or partitions, not both!\n"); + $FAIL = 1; + exit 127; + } + + if ( !$CONFIG{ 'swap-dev' } && !$CONFIG{ 'noswap' } ) + { + logprint("Please choose swap-dev or noswap with image-dev!\n"); + $FAIL = 1; + exit 127; + } }