[Fai-commit] r5655 - people/michael/experimental/patches
Michael Tautschnig
mt at alioth.debian.org
Mon Nov 9 11:46:23 UTC 2009
Author: mt
Date: 2009-11-09 11:46:23 +0000 (Mon, 09 Nov 2009)
New Revision: 5655
Added:
people/michael/experimental/patches/setup-storage_lvm-preserve-bugfix
Modified:
people/michael/experimental/patches/series
Log:
Added bugfix for LVM <-> preserve logic error
Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series 2009-11-03 16:16:04 UTC (rev 5654)
+++ people/michael/experimental/patches/series 2009-11-09 11:46:23 UTC (rev 5655)
@@ -5,3 +5,4 @@
bugfix-479537
setup-storage_full-crypto-support
setup-storage_no-cylinder-boundaries
+setup-storage_lvm-preserve-bugfix
Added: people/michael/experimental/patches/setup-storage_lvm-preserve-bugfix
===================================================================
--- people/michael/experimental/patches/setup-storage_lvm-preserve-bugfix (rev 0)
+++ people/michael/experimental/patches/setup-storage_lvm-preserve-bugfix 2009-11-09 11:46:23 UTC (rev 5655)
@@ -0,0 +1,36 @@
+2009-11-09 Michael Tautschnig <mt at debian.org>
+
+ * setup-storage/Parser.pm: Preserved logical volumes do not induce a
+ definition of the volume group.
+Index: trunk/lib/setup-storage/Parser.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Parser.pm
++++ trunk/lib/setup-storage/Parser.pm
+@@ -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