[Fai-commit] r5670 - in trunk: bin debian lib/setup-storage

Thomas Lange lange at alioth.debian.org
Tue Nov 17 10:39:08 UTC 2009


Author: lange
Date: 2009-11-17 10:39:08 +0000 (Tue, 17 Nov 2009)
New Revision: 5670

Modified:
   trunk/bin/setup-storage
   trunk/debian/changelog
   trunk/lib/setup-storage/Parser.pm
Log:
Parser.pm: fix code for preserving lvm partitions (thanks to Michael
for the patch)

Modified: trunk/bin/setup-storage
===================================================================
--- trunk/bin/setup-storage	2009-11-17 10:32:17 UTC (rev 5669)
+++ trunk/bin/setup-storage	2009-11-17 10:39:08 UTC (rev 5670)
@@ -52,7 +52,7 @@
 
 package FAI;
 
-my $version = "1.1.3";
+my $version = "1.1.4";
 
 # command line parameter handling
 use Getopt::Std;

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-11-17 10:32:17 UTC (rev 5669)
+++ trunk/debian/changelog	2009-11-17 10:39:08 UTC (rev 5670)
@@ -7,8 +7,10 @@
   * load_keymap_consolechars: add code for usage of setupcon (thanks to
     Waldemar)
   * THANKS: add Waldemar
+  * Parser.pm: fix code for preserving lvm partitions (thanks to Michael
+    for the patch)
 
- -- Thomas Lange <lange at debian.org>  Tue, 17 Nov 2009 11:03:32 +0100
+ -- Thomas Lange <lange at debian.org>  Tue, 17 Nov 2009 11:38:49 +0100
 
 fai (3.3.1) unstable; urgency=low
 

Modified: trunk/lib/setup-storage/Parser.pm
===================================================================
--- trunk/lib/setup-storage/Parser.pm	2009-11-17 10:32:17 UTC (rev 5669)
+++ trunk/lib/setup-storage/Parser.pm	2009-11-17 10:39:08 UTC (rev 5670)
@@ -499,7 +499,7 @@
           # set $FAI::device to VG_$1
           $FAI::device = "VG_$1";
           # make sure, the volume group $1 has been defined before
-          defined ($FAI::configs{$FAI::device}) or 
+          defined ($FAI::configs{$FAI::device}{devices}) or
             die "Volume group $1 has not been declared yet.\n";
           # make sure, $2 has not been defined already
           defined ($FAI::configs{$FAI::device}{volumes}{$2}{size}{range}) and 
@@ -536,13 +536,15 @@
           # set the device name to VG_ and the name of the volume group
           $FAI::device = "VG_$1";
           # make sure, the volume group $1 not has been defined already
-          defined ($FAI::configs{$FAI::device}) and
+          defined ($FAI::configs{$FAI::device}{devices}) and
             die "Volume group $1 has been defined already.\n";
           # make sure this line is part of an LVM configuration
           ($FAI::device =~ /^VG_/) or
             die "vg is invalid in a non LVM-context.\n";
-          # initialise the new hash
-          $FAI::configs{$FAI::device}{volumes} = {};
+          # initialise the new hash unless some preserve/define already created
+          # it
+          defined($FAI::configs{$FAI::device}{volumes}) or
+            $FAI::configs{$FAI::device}{volumes} = {};
           # initialise the list of physical devices
           $FAI::configs{$FAI::device}{devices} = ();
           # the rule must not return undef




More information about the Fai-commit mailing list