[Fai-commit] r4607 - people/michael/features/setup_harddisks_2/implementation
andreas at alioth.debian.org
andreas at alioth.debian.org
Tue Oct 9 13:02:49 UTC 2007
Author: andreas
Date: 2007-10-09 13:02:48 +0000 (Tue, 09 Oct 2007)
New Revision: 4607
Modified:
people/michael/features/setup_harddisks_2/implementation/shdd2-parser
Log:
enhance parser to handle diskX.Y notation
Modified: people/michael/features/setup_harddisks_2/implementation/shdd2-parser
===================================================================
--- people/michael/features/setup_harddisks_2/implementation/shdd2-parser 2007-10-09 10:39:44 UTC (rev 4606)
+++ people/michael/features/setup_harddisks_2/implementation/shdd2-parser 2007-10-09 13:02:48 UTC (rev 4607)
@@ -591,7 +591,15 @@
$dev = $1;
# make $dev a full path name; can't validate device name yet as it
# might be created later on
- ( $dev =~ m{^/} ) or $dev = "/dev/$dev";
+ unless ( $dev =~ m{^/} ) {
+ if ( $dev =~ m/^disk(\d+)\.(\d+)/ ) {
+ my $short_dev = $FAI::disks[ $1 - 1 ];
+ $dev = "/dev/$short_dev$2";
+ }
+ else {
+ $dev = "/dev/$dev";
+ }
+ }
# options are only valid for RAID
defined( $2 ) and ( $FAI::device ne "RAID" ) and die "Option $2 invalid in a non-RAID context\n";
if( $FAI::device eq "RAID" )
More information about the Fai-commit
mailing list