[Fai-commit] r4783 - people/michael/features/setup_harddisks_2/implementation/lib

michael-guest at alioth.debian.org michael-guest at alioth.debian.org
Wed Nov 21 23:06:51 UTC 2007


Author: michael-guest
Date: 2007-11-21 23:06:51 +0000 (Wed, 21 Nov 2007)
New Revision: 4783

Modified:
   people/michael/features/setup_harddisks_2/implementation/lib/parser.pm
Log:
fixed handling of BOOT_DEVICE and BOOT_PARTITION in case they are not on the
same device


Modified: people/michael/features/setup_harddisks_2/implementation/lib/parser.pm
===================================================================
--- people/michael/features/setup_harddisks_2/implementation/lib/parser.pm	2007-11-21 18:05:08 UTC (rev 4782)
+++ people/michael/features/setup_harddisks_2/implementation/lib/parser.pm	2007-11-21 23:06:51 UTC (rev 4783)
@@ -376,10 +376,7 @@
           $FAI::configs{$FAI::device}{bootable} = $1;
           ( $FAI::device =~ /^PHY_(.+)$/ ) or die 
             "INTERNAL ERROR: unexpected device name\n";
-          # set the BOOT_DEVICE and BOOT_PARTITION variables
           $FAI::disk_var{BOOT_DEVICE} = $1; 
-          $FAI::disk_var{BOOT_PARTITION} = $1 . 
-            $FAI::configs{$FAI::device}{bootable}; 
         }
         | 'virtual'
         {
@@ -459,14 +456,14 @@
           # if the mount point is / or /boot and we are currently doing a
           # physical device, the variables should be set, unless they are
           # already
-          if ( $FAI::configs{$FAI::device}{bootable} == -1 && 
-            $FAI::device =~ /^PHY_(.+)$/ && 
+          if ( $FAI::device =~ /^PHY_(.+)$/ && 
             ( $item[ 1 ] eq "/boot" || ( $item[ 1 ] eq "/" && 
-              !defined( $FAI::disk_var{BOOT_DEVICE} ) ) ) ) {
-              # set the BOOT_DEVICE and BOOT_PARTITION variables
-              $FAI::disk_var{BOOT_DEVICE} = $1; 
+              !defined( $FAI::disk_var{BOOT_PARTITION} ) ) ) ) {
+              # set the BOOT_DEVICE and BOOT_PARTITION variables, if necessary
               $FAI::disk_var{BOOT_PARTITION} = $1 . 
                 $FAI::partition_pointer->{number};
+              defined( $FAI::disk_var{BOOT_DEVICE} ) or
+                $FAI::disk_var{BOOT_DEVICE} = $1; 
           }
         }
 




More information about the Fai-commit mailing list