From a41e116e88bef4b5b96ac2c909dd997cfed815e9 Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 5 Mar 2007 14:52:01 +0000 Subject: [PATCH] 2007-03-05 14:52:01 by steve BUGFIX: for image-server. --- bin/xt-install-image | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/xt-install-image b/bin/xt-install-image index 8df7f69..74328fc 100755 --- a/bin/xt-install-image +++ b/bin/xt-install-image @@ -80,7 +80,7 @@ Untar a .tar file into the new installation location. This tarfile is assumed t -- http://www.steve.org.uk/ - $Id: xt-install-image,v 1.51 2007-03-01 10:17:50 steve Exp $ + $Id: xt-install-image,v 1.52 2007-03-05 14:52:01 steve Exp $ =cut @@ -414,7 +414,7 @@ sub parseCommandLineArguments if ( $VERSION ) { - my $REVISION = '$Revision: 1.51 $'; + my $REVISION = '$Revision: 1.52 $'; if ( $REVISION =~ /1.([0-9.]+) / ) { $REVISION = $1; @@ -784,12 +784,14 @@ sub do_image_server # $request .= "&arch=xen"; $request .= "&root_device=/dev/sda"; - $request .= "&ip1=" . $ENV{'ip'}; + $request .= "&ip1=" . $ENV{'ip'}; + $request .= "&dist=" . CGI::escapeHTML( $CONFIG{'dist'} ); + $request .= "&hostname=" . CGI::escapeHTML( $CONFIG{'hostname'} ); # # We only care about some keys # - foreach my $k ( qw/ dhcp broadcast gateway hostname netmask / ) + foreach my $k ( qw/ dhcp broadcast gateway netmask / ) { # Skip values which aren't defined. next unless defined $ENV{$k}; @@ -827,7 +829,7 @@ sub do_image_server # Make sure we don't wait indefinitely. while( $attempt < $attempts ) { - $CONFIG{'verbose'} && print "Request: [$attempt/$CONFIG{'attempts'}]\n"; + $CONFIG{'verbose'} && print "Request: [$attempt/$attempts]\n"; # # Make a request to see if our tar file is ready yet.