From c25d326e22780dbc12dbde52e60393899091bd5c Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 21 Dec 2005 03:31:44 +0000 Subject: [PATCH] 2005-12-21 03:31:44 by steve *Really* fix the systen's hostname. *sigh* --- xen-create-image | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xen-create-image b/xen-create-image index 66fb989..148c055 100755 --- a/xen-create-image +++ b/xen-create-image @@ -226,7 +226,7 @@ suffixed with either Mb, or Gb. -- http://www.steve.org.uk/ - $Id: xen-create-image,v 1.47 2005-12-21 03:15:40 steve Exp $ + $Id: xen-create-image,v 1.48 2005-12-21 03:31:44 steve Exp $ =cut @@ -981,10 +981,17 @@ sub setupNetworking { my ( $prefix ) = ( @_ ); - runCommand ("echo '$CONFIG{'hostname'}' > $prefix/etc/hostname" ); + # + # Set the hostname. + # + open( HOSTNAME, ">", $prefix . "/etc/hostname" ); + print HOSTNAME $CONFIG{'hostname'} . "\n"; + close( HOSTNAME ); + # + # Set the networking optins. + # open( IP, ">", $prefix . "/etc/network/interfaces" ); - if ( $CONFIG{'dhcp'} ) { print IP<