]> xenbits.xensource.com Git - people/dariof/xen-tools.git/commitdiff
xen-delete-image no more passes $CONFIG{hostname} as array to logprint_with_config
authorAxel Beckert <abe@deuxchevaux.org>
Fri, 25 Jan 2013 14:22:42 +0000 (15:22 +0100)
committerAxel Beckert <abe@deuxchevaux.org>
Fri, 25 Jan 2013 14:22:42 +0000 (15:22 +0100)
The deletion of failed attempts was logged to files named like
ARRAY(0xa9dd98).log because the hostname was passed twice, i.e. as
arrayref (which didn't hurt otherwise).

bin/xen-delete-image

index 842f9ee0730ffbfdc763d686d3cd077f28394cad..e410fe554efc641f40b44ff03d709786d9e4ab1f 100755 (executable)
@@ -252,7 +252,9 @@ while ( my $name = shift )
 my $hosts = $CONFIG{ 'hostname' };
 foreach my $name (@$hosts)
 {
-    if ( $CONFIG{ 'no_xen_ok' } or !xenRunning($name, \%CONFIG) )
+    my %PER_HOST_CONFIG = %CONFIG;
+    $PER_HOST_CONFIG{ 'hostname' } = $name;
+    if ( $CONFIG{ 'no_xen_ok' } or !xenRunning($name, \%PER_HOST_CONFIG) )
     {
         deleteXenImage($name);
     }