From b30c4daa64daab910298d64338ab3e3e26f058f5 Mon Sep 17 00:00:00 2001 From: steve Date: Sun, 20 Aug 2006 01:19:56 +0000 Subject: [PATCH] 2006-08-20 01:19:56 by steve Whitespace fixups. --- bin/xt-create-xen-config | 36 +++++----- bin/xt-customize-image | 110 ++++++++++++++-------------- bin/xt-install-image | 150 +++++++++++++++++++-------------------- 3 files changed, 144 insertions(+), 152 deletions(-) diff --git a/bin/xt-create-xen-config b/bin/xt-create-xen-config index 52138ec..0071c59 100755 --- a/bin/xt-create-xen-config +++ b/bin/xt-create-xen-config @@ -96,7 +96,7 @@ xt-create-config - Create a Xen configuration file for a new guest -- http://www.steve.org.uk/ - $Id: xt-create-xen-config,v 1.16 2006-08-19 08:19:27 steve Exp $ + $Id: xt-create-xen-config,v 1.17 2006-08-20 01:19:56 steve Exp $ =cut @@ -189,13 +189,13 @@ sub parseCommandLineArguments # Parse options. # GetOptions( - "output=s", \$CONFIG{'output'}, - "template=s", \$CONFIG{'template'}, - "verbose", \$CONFIG{'verbose'}, - "help", \$HELP, - "manual", \$MANUAL, - "version", \$VERSION - ); + "output=s", \$CONFIG{'output'}, + "template=s", \$CONFIG{'template'}, + "verbose", \$CONFIG{'verbose'}, + "help", \$HELP, + "manual", \$MANUAL, + "version", \$VERSION + ); pod2usage(1) if $HELP; pod2usage(-verbose => 2 ) if $MANUAL; @@ -203,8 +203,7 @@ sub parseCommandLineArguments if ( $VERSION ) { - my $REVISION = '$Revision: 1.16 $'; - + my $REVISION = '$Revision: 1.17 $'; if ( $REVISION =~ /1.([0-9.]+) / ) { $REVISION = $1; @@ -212,7 +211,6 @@ sub parseCommandLineArguments print "xt-create-xen-config release $RELEASE - CVS: $REVISION\n"; exit; - } } @@ -233,8 +231,8 @@ sub checkArguments # if ( ! defined( $CONFIG{'output'} ) ) { - print "The '--output' argument is mandatory\n"; - exit 1; + print "The '--output' argument is mandatory\n"; + exit 1; } # @@ -298,7 +296,7 @@ sub createXenConfig my $device = 'sda'; if ( defined( $ENV{'ide'} ) ) { - $device = 'hda'; + $device = 'hda'; } $ENV{'device'} = $device; @@ -308,7 +306,7 @@ sub createXenConfig # if ( $ENV{'memory'} =~ /([0-9]+)/ ) { - $ENV{'memory'} = $1; + $ENV{'memory'} = $1; } @@ -320,13 +318,13 @@ sub createXenConfig if ( $ENV{'lvm'} ) { - $image_vbd = "phy:$ENV{'lvm'}/$ENV{'hostname'}-disk"; - $swap_vbd = "phy:$ENV{'lvm'}/$ENV{'hostname'}-swap"; + $image_vbd = "phy:$ENV{'lvm'}/$ENV{'hostname'}-disk"; + $swap_vbd = "phy:$ENV{'lvm'}/$ENV{'hostname'}-swap"; } else { - $image_vbd = "file:$ENV{'dir'}/domains/$ENV{'hostname'}/disk.img"; - $swap_vbd = "file:$ENV{'dir'}/domains/$ENV{'hostname'}/swap.img"; + $image_vbd = "file:$ENV{'dir'}/domains/$ENV{'hostname'}/disk.img"; + $swap_vbd = "file:$ENV{'dir'}/domains/$ENV{'hostname'}/swap.img"; } $ENV{'image_vbd'} = $image_vbd; $ENV{'swap_vbd'} = $swap_vbd; diff --git a/bin/xt-customize-image b/bin/xt-customize-image index f1b10b5..66fad82 100755 --- a/bin/xt-customize-image +++ b/bin/xt-customize-image @@ -66,7 +66,7 @@ xt-customize-image - Customize a freshly installed copy of GNU/Linux -- http://www.steve.org.uk/ - $Id: xt-customize-image,v 1.15 2006-08-16 09:42:44 steve Exp $ + $Id: xt-customize-image,v 1.16 2006-08-20 01:19:56 steve Exp $ =cut @@ -151,12 +151,12 @@ sub parseCommandLineArguments # Parse options. # GetOptions( - "location=s", \$CONFIG{'location'}, - "dist=s", \$CONFIG{'dist'}, - "verbose", \$CONFIG{'verbose'}, - "help", \$HELP, - "manual", \$MANUAL, - "version", \$VERSION + "location=s", \$CONFIG{'location'}, + "dist=s", \$CONFIG{'dist'}, + "verbose", \$CONFIG{'verbose'}, + "help", \$HELP, + "manual", \$MANUAL, + "version", \$VERSION ); pod2usage(1) if $HELP; @@ -165,8 +165,7 @@ sub parseCommandLineArguments if ( $VERSION ) { - my $REVISION = '$Revision: 1.15 $'; - + my $REVISION = '$Revision: 1.16 $'; if ( $REVISION =~ /1.([0-9.]+) / ) { $REVISION = $1; @@ -174,7 +173,6 @@ sub parseCommandLineArguments print "xt-customize-image release $RELEASE - CVS: $REVISION\n"; exit; - } } @@ -195,8 +193,8 @@ sub checkArguments # if ( ! defined( $CONFIG{'location'} ) ) { - print "The '--location' argument is mandatory\n"; - exit 1; + print "The '--location' argument is mandatory\n"; + exit 1; } @@ -205,9 +203,9 @@ sub checkArguments # if ( ! -d $CONFIG{'location'} ) { - print "The installation directory we've been given doesn't exist\n"; - print "We tried to use : $CONFIG{'location'}\n"; - exit 1; + print "The installation directory we've been given doesn't exist\n"; + print "We tried to use : $CONFIG{'location'}\n"; + exit 1; } @@ -216,8 +214,8 @@ sub checkArguments # if ( ! defined( $CONFIG{'dist'} ) ) { - print "The '--dist' argument is mandatory\n"; - exit 1; + print "The '--dist' argument is mandatory\n"; + exit 1; } @@ -232,7 +230,7 @@ sub checkArguments if ( ! -d $dir ) { - print < argument using the debootstr -- http://www.steve.org.uk/ - $Id: xt-install-image,v 1.30 2006-08-18 13:16:55 steve Exp $ + $Id: xt-install-image,v 1.31 2006-08-20 01:19:56 steve Exp $ =cut @@ -170,15 +170,16 @@ else # # However errors have been known to happen ;) # -# Test that we have some standard files. +# Test that we have some standard files present. # foreach my $file ( qw( /bin/ls /bin/cp ) ) { if ( ! -x $CONFIG{'location'} . $file ) { - print "The installation of the new system appears to have failed.\n"; - print "\n"; - print "There is no '$file' installed in the new installation directory\n"; exit 1; + print "The installation of the new system appears to have failed.\n"; + print "\n"; + print "There is no '$file' installed in the new installation directory\n"; + exit 1; } } @@ -209,27 +210,27 @@ sub parseCommandLineArguments # Parse options. # GetOptions( - # Mandatory - "location=s", \$CONFIG{'location'}, - "dist=s", \$CONFIG{'dist'}, - "hostname=s", \$CONFIG{'hostname'}, + # Mandatory + "location=s", \$CONFIG{'location'}, + "dist=s", \$CONFIG{'dist'}, + "hostname=s", \$CONFIG{'hostname'}, - # Exclusive. - "tar=s", \$CONFIG{'tar'}, - "copy=s", \$CONFIG{'copy'}, - "rpmstrap", \$CONFIG{'rpmstrap'}, - "debootstrap", \$CONFIG{'debootstrap'}, + # Exclusive. + "tar=s", \$CONFIG{'tar'}, + "copy=s", \$CONFIG{'copy'}, + "rpmstrap", \$CONFIG{'rpmstrap'}, + "debootstrap", \$CONFIG{'debootstrap'}, - # Misc - "arch=s", \$CONFIG{'arch'}, - "cache=s", \$CONFIG{'cache'}, - "mirror=s", \$CONFIG{'mirror'}, + # Misc + "arch=s", \$CONFIG{'arch'}, + "cache=s", \$CONFIG{'cache'}, + "mirror=s", \$CONFIG{'mirror'}, - # Help. - "verbose", \$CONFIG{'verbose'}, - "help", \$HELP, - "manual", \$MANUAL, - "version", \$VERSION + # Help. + "verbose", \$CONFIG{'verbose'}, + "help", \$HELP, + "manual", \$MANUAL, + "version", \$VERSION ); pod2usage(1) if $HELP; @@ -238,16 +239,14 @@ sub parseCommandLineArguments if ( $VERSION ) { - my $REVISION = '$Revision: 1.30 $'; - - if ( $REVISION =~ /1.([0-9.]+) / ) - { - $REVISION = $1; - } - - print "xt-install-image release $RELEASE - CVS: $REVISION\n"; - exit; + my $REVISION = '$Revision: 1.31 $'; + if ( $REVISION =~ /1.([0-9.]+) / ) + { + $REVISION = $1; + } + print "xt-install-image release $RELEASE - CVS: $REVISION\n"; + exit; } } @@ -268,8 +267,8 @@ sub checkArguments # if ( ! defined( $CONFIG{'location'} ) ) { - print "The '--location' argument is mandatory\n"; - exit 1; + print "The '--location' argument is mandatory\n"; + exit 1; } @@ -278,9 +277,9 @@ sub checkArguments # if ( ! -d $CONFIG{'location'} ) { - print "The installation directory we've been given doesn't exist\n"; - print "We tried to use : $CONFIG{'location'}\n"; - exit 1; + print "The installation directory we've been given doesn't exist\n"; + print "We tried to use : $CONFIG{'location'}\n"; + exit 1; } @@ -289,8 +288,8 @@ sub checkArguments # if ( ! defined( $CONFIG{'dist'} ) ) { - print "The '--dist' argument is mandatory\n"; - exit 1; + print "The '--dist' argument is mandatory\n"; + exit 1; } @@ -305,7 +304,7 @@ sub checkArguments if ( ! -d $dir ) { - print < 1 ) { - print <