[Fai-commit] r6704 - trunk/lib/setup-storage

Michael Tautschnig mt at alioth.debian.org
Sat Oct 22 12:35:54 UTC 2011


Author: mt
Date: 2011-10-22 12:35:53 +0000 (Sat, 22 Oct 2011)
New Revision: 6704

Modified:
   trunk/lib/setup-storage/Commands.pm
Log:
setup-storage/Commands.pm: Virtual disks don't have partition types.


Modified: trunk/lib/setup-storage/Commands.pm
===================================================================
--- trunk/lib/setup-storage/Commands.pm	2011-10-22 12:35:25 UTC (rev 6703)
+++ trunk/lib/setup-storage/Commands.pm	2011-10-22 12:35:53 UTC (rev 6704)
@@ -180,8 +180,9 @@
   # make sure this device really exists (we can't check for the partition
   # as that may be created later on
   (-b $disk) or die "Specified disk $disk does not exist in this system!\n";
-  # set the raid/lvm unless this is an entire disk flag
-  return 0 if ($part_no == -1);
+  # set the raid/lvm unless this is an entire disk flag or a virtual disk
+  return 0 if ($part_no == -1 ||
+    (defined($FAI::configs{"PHY_$disk"}) && $FAI::configs{"PHY_$disk"}{virtual}));
   my $pre = "exist_$d";
   $pre .= ",cleared2_$disk" if (defined($FAI::configs{"PHY_$disk"}));
   &FAI::push_command( "parted -s $disk set $part_no $t on", $pre, "type_${t}_$d" );




More information about the Fai-commit mailing list