[Fai-commit] r5733 - people/michael/experimental/patches
Michael Tautschnig
mt at alioth.debian.org
Tue Mar 16 19:47:30 UTC 2010
Author: mt
Date: 2010-03-16 19:47:30 +0000 (Tue, 16 Mar 2010)
New Revision: 5733
Modified:
people/michael/experimental/patches/setup-storage_lvm-preserve2
people/michael/experimental/patches/setup-storage_preserve-lazy
people/michael/experimental/patches/setup-storage_used-devs-only
Log:
fixed missing return
Modified: people/michael/experimental/patches/setup-storage_lvm-preserve2
===================================================================
--- people/michael/experimental/patches/setup-storage_lvm-preserve2 2010-03-15 20:00:35 UTC (rev 5732)
+++ people/michael/experimental/patches/setup-storage_lvm-preserve2 2010-03-16 19:47:30 UTC (rev 5733)
@@ -62,7 +62,7 @@
===================================================================
--- trunk.orig/lib/setup-storage/Volumes.pm
+++ trunk/lib/setup-storage/Volumes.pm
-@@ -435,11 +435,17 @@
+@@ -437,11 +437,17 @@
my ($device_name) = @_;
my ($i_p_d, $disk, $part_no) = &FAI::phys_dev($device_name);
@@ -84,7 +84,7 @@
if (defined($FAI::configs{RAID}{volumes}{$vol}) &&
$FAI::configs{RAID}{volumes}{$vol}{preserve} != 1) {
$FAI::configs{RAID}{volumes}{$vol}{preserve} = 1;
-@@ -448,6 +454,8 @@
+@@ -450,6 +456,8 @@
} elsif ($device_name =~ m{^/dev/([^/\s]+)/([^/\s]+)$}) {
my $vg = $1;
my $lv = $2;
@@ -93,7 +93,7 @@
if (defined($FAI::configs{"VG_$vg"}{volumes}{$lv}) &&
$FAI::configs{"VG_$vg"}{volumes}{$lv}{size}{preserve} != 1) {
$FAI::configs{"VG_$vg"}{volumes}{$lv}{size}{preserve} = 1;
-@@ -477,6 +485,9 @@
+@@ -479,6 +487,9 @@
(defined($FAI::current_config{$1}{partitions}{$part_id}) ? 1 : 0)
if (2 == $part->{size}->{preserve});
next unless ($part->{size}->{preserve} || $part->{size}->{resize});
@@ -103,7 +103,7 @@
defined ($part->{size}->{range}) or die
"Can't preserve ". &FAI::make_device_name($1, $part->{number})
. " because it is not defined in the current config\n";
-@@ -491,6 +502,8 @@
+@@ -493,6 +504,8 @@
if (2 == $FAI::configs{$config}{volumes}{$l}{size}{preserve});
next unless ($FAI::configs{$config}{volumes}{$l}{size}{preserve} == 1 ||
$FAI::configs{$config}{volumes}{$l}{size}{resize} == 1);
@@ -112,7 +112,7 @@
defined ($FAI::configs{$config}{volumes}{$l}{size}{range}) or die
"Can't preserve /dev/$1/$l because it is not defined in the current config\n";
&FAI::mark_preserve($_) foreach (keys %{ $FAI::configs{$config}{devices} });
-@@ -504,6 +517,8 @@
+@@ -506,6 +519,8 @@
(defined($FAI::current_raid_config{$r}) ? 1 : 0)
if (2 == $FAI::configs{$config}{volumes}{$r}{preserve});
next unless ($FAI::configs{$config}{volumes}{$r}{preserve} == 1);
Modified: people/michael/experimental/patches/setup-storage_preserve-lazy
===================================================================
--- people/michael/experimental/patches/setup-storage_preserve-lazy 2010-03-15 20:00:35 UTC (rev 5732)
+++ people/michael/experimental/patches/setup-storage_preserve-lazy 2010-03-16 19:47:30 UTC (rev 5733)
@@ -98,7 +98,7 @@
===================================================================
--- trunk.orig/lib/setup-storage/Volumes.pm
+++ trunk/lib/setup-storage/Volumes.pm
-@@ -473,6 +473,9 @@
+@@ -475,6 +475,9 @@
if ($config =~ /^PHY_(.+)$/) {
foreach my $part_id (&numsort(keys %{ $FAI::configs{$config}{partitions} })) {
my $part = (\%FAI::configs)->{$config}->{partitions}->{$part_id};
@@ -108,7 +108,7 @@
next unless ($part->{size}->{preserve} || $part->{size}->{resize});
defined ($part->{size}->{range}) or die
"Can't preserve ". &FAI::make_device_name($1, $part->{number})
-@@ -483,6 +486,9 @@
+@@ -485,6 +488,9 @@
# check for logical volumes that need to be preserved and preserve the
# underlying devices recursively
foreach my $l (keys %{ $FAI::configs{$config}{volumes} }) {
@@ -118,7 +118,7 @@
next unless ($FAI::configs{$config}{volumes}{$l}{size}{preserve} == 1 ||
$FAI::configs{$config}{volumes}{$l}{size}{resize} == 1);
defined ($FAI::configs{$config}{volumes}{$l}{size}{range}) or die
-@@ -494,6 +500,9 @@
+@@ -496,6 +502,9 @@
# check for volumes that need to be preserved and preserve the underlying
# devices recursively
foreach my $r (keys %{ $FAI::configs{$config}{volumes} }) {
Modified: people/michael/experimental/patches/setup-storage_used-devs-only
===================================================================
--- people/michael/experimental/patches/setup-storage_used-devs-only 2010-03-15 20:00:35 UTC (rev 5732)
+++ people/michael/experimental/patches/setup-storage_used-devs-only 2010-03-16 19:47:30 UTC (rev 5733)
@@ -6,7 +6,7 @@
===================================================================
--- trunk.orig/lib/setup-storage/Volumes.pm
+++ trunk/lib/setup-storage/Volumes.pm
-@@ -37,18 +37,58 @@
+@@ -37,18 +37,60 @@
################################################################################
#
@@ -42,6 +42,8 @@
+ &FAI::internal_error("Unexpected key $config");
+ }
+ }
++
++ return @phys_devs;
+}
+
+################################################################################
More information about the Fai-commit
mailing list