[Fai-commit] r4850 - people/michael/features/setup_harddisks_2/implementation/lib
mt at alioth.debian.org
mt at alioth.debian.org
Thu Mar 13 21:01:21 UTC 2008
Author: mt
Date: 2008-03-13 21:01:20 +0000 (Thu, 13 Mar 2008)
New Revision: 4850
Modified:
people/michael/features/setup_harddisks_2/implementation/lib/parser.pm
people/michael/features/setup_harddisks_2/implementation/lib/sizes.pm
Log:
properly deal with virtual configs:
- we can't check for /dev/hda, it doesn't exist (that's the point of a virtual
config, after all)
- for virtual configs, there is no limit on the number of primary partitions
Modified: people/michael/features/setup_harddisks_2/implementation/lib/parser.pm
===================================================================
--- people/michael/features/setup_harddisks_2/implementation/lib/parser.pm 2008-03-12 15:56:56 UTC (rev 4849)
+++ people/michael/features/setup_harddisks_2/implementation/lib/parser.pm 2008-03-13 21:01:20 UTC (rev 4850)
@@ -100,9 +100,6 @@
# appropriate
($disk =~ m{^/}) or $disk = "/dev/$disk";
- # test, whether $disk is a block special device
- (-b $disk) or die "$disk is not a valid device name\n";
-
# prepend PHY_
$FAI::device = "PHY_$disk";
@@ -167,7 +164,8 @@
$part_number++;
# msdos disk labels don't allow for more than 4 primary partitions
- ($part_number < 5 || $FAI::configs{$FAI::device}{disklabel} ne "msdos")
+ ($part_number < 5 || $FAI::configs{$FAI::device}{virtual} ||
+ $FAI::configs{$FAI::device}{disklabel} ne "msdos")
or die "$part_number are too many primary partitions\n";
} else {
Modified: people/michael/features/setup_harddisks_2/implementation/lib/sizes.pm
===================================================================
--- people/michael/features/setup_harddisks_2/implementation/lib/sizes.pm 2008-03-12 15:56:56 UTC (rev 4849)
+++ people/michael/features/setup_harddisks_2/implementation/lib/sizes.pm 2008-03-13 21:01:20 UTC (rev 4850)
@@ -561,6 +561,8 @@
# nothing to be done, if this is a configuration for a virtual disk
next if $FAI::configs{$config}{virtual};
my $disk = $1; # the device name of the disk
+ # test, whether $disk is a block special device
+ (-b $disk) or die "$disk is not a valid device name\n";
# reference to the current disk config
my $current_disk = $FAI::current_config{$disk};
More information about the Fai-commit
mailing list