From 3c97c8693a01598e679a7eed456b2a61d4adb504 Mon Sep 17 00:00:00 2001 From: steve Date: Sun, 23 Jul 2006 00:56:29 +0000 Subject: [PATCH] 2006-07-23 00:56:29 by steve Make sure we have an installation method specified: #379347 --- bin/xen-create-image | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index e8b62c7..c660d7f 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -439,7 +439,7 @@ Install an X11 server, using VNC and XDM -- http://www.steve.org.uk/ - $Id: xen-create-image,v 1.56 2006-07-23 00:51:48 steve Exp $ + $Id: xen-create-image,v 1.57 2006-07-23 00:56:29 steve Exp $ =cut @@ -865,7 +865,7 @@ sub parseCommandLineArguments if ( $VERSION ) { - my $REVISION = '$Revision: 1.56 $'; + my $REVISION = '$Revision: 1.57 $'; if ( $REVISION =~ /1.([0-9.]+) / ) { @@ -1010,6 +1010,35 @@ E_OR exit; } + # + # Make sure we have one, and only one, installation method. + # + my $count = 0; + foreach my $key ( qw/debootstrap rpmstrap copy tar/ ) + { + if ( defined $CONFIG{$key} ) + { + $count += 1; + } + } + if ( $count != 1 ) + { + print <