[Fai-commit] r6099 - branches/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Mon Oct 4 14:12:02 UTC 2010


Author: mt
Date: 2010-10-04 14:11:52 +0000 (Mon, 04 Oct 2010)
New Revision: 6099

Modified:
   branches/experimental/patches/setup-storage_preserve-format-all
   branches/experimental/patches/setup-storage_raw-disk
Log:
Make sure we have exist_$device set for each preserved partition, even in case
:all is in use


Modified: branches/experimental/patches/setup-storage_preserve-format-all
===================================================================
--- branches/experimental/patches/setup-storage_preserve-format-all	2010-10-04 07:45:35 UTC (rev 6098)
+++ branches/experimental/patches/setup-storage_preserve-format-all	2010-10-04 14:11:52 UTC (rev 6099)
@@ -447,11 +447,18 @@
 ===================================================================
 --- trunk.orig/lib/setup-storage/Commands.pm
 +++ trunk/lib/setup-storage/Commands.pm	
-@@ -1102,6 +1102,9 @@
+@@ -1102,6 +1102,16 @@
          # no partition table operations
          $FAI::partition_table_deps{$disk} = "";
        }
 +    } elsif (defined($FAI::configs{$config}{opts_all}{preserve})) {
++      foreach my $part_id (&numsort(keys %{ $FAI::configs{$config}{partitions} })) {
++        # all partitions exist
++        &FAI::push_command( "true", "",
++          "exist_" . &FAI::make_device_name($disk, $part_id) );
++        # no partition table operations
++        $FAI::partition_table_deps{$disk} = "";
++      }
 +      # no changes on this disk
 +      $FAI::partition_table_deps{$disk} = "";
      } else {

Modified: branches/experimental/patches/setup-storage_raw-disk
===================================================================
--- branches/experimental/patches/setup-storage_raw-disk	2010-10-04 07:45:35 UTC (rev 6098)
+++ branches/experimental/patches/setup-storage_raw-disk	2010-10-04 14:11:52 UTC (rev 6099)
@@ -23,9 +23,9 @@
 +      # no partition table operations
 +      $FAI::partition_table_deps{$disk} = "";
      } elsif (defined($FAI::configs{$config}{opts_all}{preserve})) {
-       # no changes on this disk
-       $FAI::partition_table_deps{$disk} = "";
-@@ -1121,7 +1122,7 @@
+       foreach my $part_id (&numsort(keys %{ $FAI::configs{$config}{partitions} })) {
+         # all partitions exist
+@@ -1128,7 +1129,7 @@
          || $part->{size}->{extended} == 1);
  
        # create the filesystem on the device




More information about the Fai-commit mailing list