From c85485ae3f55f7a35cf064f5da0051a2ec618796 Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 19 Dec 2005 18:26:48 +0000 Subject: [PATCH] =?UTF-8?q?2005-12-19=2018:26:48=20by=20steve=20=20=20Allo?= =?UTF-8?q?w=20user=20to=20select=20distribution=20to=20install=20via=20ei?= =?UTF-8?q?ther=20'dist=3D=3F=3F'=20in=20the=20=20configuration=20file,=20?= =?UTF-8?q?or=20'--dist=3Dfoo'=20on=20the=20command=20line.?= --- etc/xen-tools.conf | 4 ++-- xen-create-image | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/etc/xen-tools.conf b/etc/xen-tools.conf index ecf6a72..1c2d1eb 100644 --- a/etc/xen-tools.conf +++ b/etc/xen-tools.conf @@ -11,7 +11,7 @@ # --fs=ext3 becomes 'fs = ext3'. # # -# $Id: xen-tools.conf,v 1.6 2005-12-19 16:41:14 steve Exp $ +# $Id: xen-tools.conf,v 1.7 2005-12-19 18:26:48 steve Exp $ # @@ -29,7 +29,7 @@ size = 2Gb # Disk image size. memory = 128Mb # Memory size swap = 128Mb # Swap size filesystem = ext3 # use EXT3 filesystems - +dist = sarge # Default distribution to install. ## diff --git a/xen-create-image b/xen-create-image index 67ca33b..6e5e983 100755 --- a/xen-create-image +++ b/xen-create-image @@ -47,6 +47,9 @@ Specify the broadcast address for the virtual image, only useful if DHCP is not =item B<--dhcp> Specify that the virtual image should use DHCP to obtain its networking information. +=item B<--dist> +Specify the distribution to install, defaults to 'sarge'. + =item B<--fs> Specify the filesystem the image should be given. Valid options are 'ext3', 'xfs', or 'reiserfs'. @@ -190,7 +193,7 @@ broadcast = 255.255.255.0 -- http://www.steve.org.uk/ - $Id: xen-create-image,v 1.26 2005-12-19 17:40:39 steve Exp $ + $Id: xen-create-image,v 1.27 2005-12-19 18:26:48 steve Exp $ =cut @@ -261,6 +264,8 @@ $CONFIG{'size'} = '2000Mb'; $CONFIG{'swap'} = '128M'; $CONFIG{'fs'} = 'ext3'; $CONFIG{'mirror'} = 'http://ftp.us.debian.org/debian'; +$CONFIG{'dist'} = 'sarge'; + # # Read configuration file(s) if they exist. @@ -398,7 +403,7 @@ foreach my $file ( glob( "/var/cache/apt/archives/*.deb" ) ) # Install the base system. # print "Running debootstrap to install the system. This will take a while!\n"; -`debootstrap sarge $dir $CONFIG{'mirror'}`; +`debootstrap $CONFIG{'dist'} $dir $CONFIG{'mirror'}`; print "Done\n"; # @@ -670,6 +675,7 @@ sub parseCommandLineArguments "memory=s", \$CONFIG{'memory'}, "fs=s", \$CONFIG{'fs'}, "boot", \$CONFIG{'boot'}, + "dist", \$CONFIG{'dist'}, "help", \$HELP, "manual", \$MANUAL );