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

Michael Tautschnig mt at alioth.debian.org
Wed May 6 19:18:51 UTC 2009


Author: mt
Date: 2009-05-06 19:18:51 +0000 (Wed, 06 May 2009)
New Revision: 5409

Added:
   people/michael/experimental/patches/setup-storage_bootable
Modified:
   people/michael/experimental/patches/series
   people/michael/experimental/patches/setup-storage_missing-raid-devs
Log:
fixed set boot for / by default


Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series	2009-05-05 17:09:16 UTC (rev 5408)
+++ people/michael/experimental/patches/series	2009-05-06 19:18:51 UTC (rev 5409)
@@ -1,3 +1,4 @@
+setup-storage_bootable
 setup-storage_ignore-gpt-warning
 logtail
 grub-pc

Added: people/michael/experimental/patches/setup-storage_bootable
===================================================================
--- people/michael/experimental/patches/setup-storage_bootable	                        (rev 0)
+++ people/michael/experimental/patches/setup-storage_bootable	2009-05-06 19:18:51 UTC (rev 5409)
@@ -0,0 +1,21 @@
+2009-05-06  Michael Tautschnig  <mt at debian.org>
+
+	* setup-storage/Parser.pm: Set the boot flag on partition mounted at /, if
+		bootable is not explicitly set.
+Index: trunk/lib/setup-storage/Parser.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Parser.pm
++++ trunk/lib/setup-storage/Parser.pm	
+@@ -522,6 +522,12 @@
+           } else {
+             $FAI::partition_pointer->{encrypt} = 0;
+           }
++          if ($FAI::device =~ /^PHY_(.+)$/ &&
++            -1 == $FAI::configs{$FAI::device}{bootable} &&
++            $FAI::partition_pointer->{mountpoint} eq "/") {
++            $FAI::configs{$FAI::device}{bootable} =
++              $FAI::partition_pointer->{number};
++          }
+         }
+ 
+     name: m{^([^/,\s\-]+)}

Modified: people/michael/experimental/patches/setup-storage_missing-raid-devs
===================================================================
--- people/michael/experimental/patches/setup-storage_missing-raid-devs	2009-05-05 17:09:16 UTC (rev 5408)
+++ people/michael/experimental/patches/setup-storage_missing-raid-devs	2009-05-06 19:18:51 UTC (rev 5409)
@@ -19,7 +19,7 @@
            # set the reference to the current volume
            # the reference is used by all further processing of this config line
            $FAI::partition_pointer = (\%FAI::configs)->{RAID}->{volumes}->{$vol_id};
-@@ -600,6 +603,8 @@
+@@ -606,6 +609,8 @@
                &FAI::internal_error("PARSER ERROR");
              # redefine the device string
              $dev = $1;
@@ -28,7 +28,7 @@
              # make $dev a full path name; can't validate device name yet as it
              # might be created later on
              unless ($dev =~ m{^/}) {
-@@ -612,14 +617,14 @@
+@@ -618,14 +623,14 @@
              my @candidates = glob($dev);
  
              # options are only valid for RAID




More information about the Fai-commit mailing list