[Fai-commit] r3273 - trunk/bin
fai-repository at svn.debian.org
fai-repository at svn.debian.org
Wed Feb 15 11:09:20 UTC 2006
Author: lange
Date: 2006-02-15 11:09:19 +0000 (Wed, 15 Feb 2006)
New Revision: 3273
Modified:
trunk/bin/setup_harddisks
Log:
mapdisk(): add support for more than two disks
Modified: trunk/bin/setup_harddisks
===================================================================
--- trunk/bin/setup_harddisks 2006-02-14 10:50:38 UTC (rev 3272)
+++ trunk/bin/setup_harddisks 2006-02-15 11:09:19 UTC (rev 3273)
@@ -152,7 +152,7 @@
# Variables
#****************************************************
-my $Version = "version 0.37fai";
+my $Version = "version 0.38fai";
my $megabyte = 1024 * 1024; # guess
# $gigabyte = 1024 * $megabyte;
@@ -340,14 +340,11 @@
my ($disk) = @_;
my @dlist = split /\s+/,$ENV{disklist};
- if ($disk eq "disk1") {
- print "Mapping disk name disk1 to $dlist[0]\n";
- $disk = $dlist[0];
+ if ($disk =~ /disk(\d+)/) {
+ my $n = $1;
+ print "Mapping disk name disk$n to $dlist[$n]\n";
+ $disk = $dlist[$n];
}
- if ($disk eq "disk2") {
- print "Mapping disk name disk2 to $dlist[1]\n";
- $disk = $dlist[1];
- }
return $disk;
}
More information about the Fai-commit
mailing list