[Fai-commit] r5301 - people/michael/experimental/patches

mt at alioth.debian.org mt at alioth.debian.org
Wed Apr 1 14:07:12 UTC 2009


Author: mt
Date: 2009-04-01 14:07:11 +0000 (Wed, 01 Apr 2009)
New Revision: 5301

Added:
   people/michael/experimental/patches/setup-storage_fs-tool-check
Modified:
   people/michael/experimental/patches/series
Log:
only check for mkfs.X when necessary


Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series	2009-04-01 13:22:33 UTC (rev 5300)
+++ people/michael/experimental/patches/series	2009-04-01 14:07:11 UTC (rev 5301)
@@ -22,3 +22,4 @@
 bugfix-521153
 setup-storage_missing-raid-devs
 setup-storage_cylinder-boundary
+setup-storage_fs-tool-check

Added: people/michael/experimental/patches/setup-storage_fs-tool-check
===================================================================
--- people/michael/experimental/patches/setup-storage_fs-tool-check	                        (rev 0)
+++ people/michael/experimental/patches/setup-storage_fs-tool-check	2009-04-01 14:07:11 UTC (rev 5301)
@@ -0,0 +1,28 @@
+2009-04-01  Michael Tautschnig  <mt at debian.org>
+
+	* setup-storage/Parser.pm: Only test for mkfs.X if such a filesystem is to be
+		created (i.e., it will not be preserved).
+Index: trunk/lib/setup-storage/Parser.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Parser.pm
++++ trunk/lib/setup-storage/Parser.pm	
+@@ -666,9 +666,17 @@
+         }
+         | /^\S+/
+         {
+-          &FAI::in_path("mkfs.$item[1]") or 
+-            die "unknown/invalid filesystem type $item[1] (mkfs.$item[1] not found in PATH)\n";
+           $FAI::partition_pointer->{filesystem} = $item[ 1 ];
++          my $to_be_preserved = 0;
++          if ($FAI::device eq "RAID") {
++            $to_be_preserved = $FAI::partition_pointer->{preserve};
++          } else {
++            $to_be_preserved = $FAI::partition_pointer->{size}->{preserve};
++          }
++          if (0 == $to_be_preserved) {
++            &FAI::in_path("mkfs.$item[1]") or
++              die "unknown/invalid filesystem type $item[1] (mkfs.$item[1] not found in PATH)\n";
++          }
+         }
+ 
+     vgcreateopt: /pvcreateopts="([^"]*)"/




More information about the Fai-commit mailing list