[Fai-commit] r6706 - trunk/lib/setup-storage
Michael Tautschnig
mt at alioth.debian.org
Sat Oct 22 12:38:36 UTC 2011
Author: mt
Date: 2011-10-22 12:38:35 +0000 (Sat, 22 Oct 2011)
New Revision: 6706
Modified:
trunk/lib/setup-storage/Parser.pm
Log:
setup-storage/Parser.pm: better error message for invalid string X in disklabel:X.
Modified: trunk/lib/setup-storage/Parser.pm
===================================================================
--- trunk/lib/setup-storage/Parser.pm 2011-10-22 12:37:34 UTC (rev 6705)
+++ trunk/lib/setup-storage/Parser.pm 2011-10-22 12:38:35 UTC (rev 6706)
@@ -650,12 +650,15 @@
}
$FAI::configs{$FAI::device}{preserveparts} = 1;
}
- | /^disklabel:(msdos|gpt-bios|gpt)/
+ | /^disklabel:(\S+)/
{
+ my $dl = $1;
+ ($dl =~ /^(msdos|gpt-bios|gpt)$/) or die
+ "Invalid disk label $dl; use one of msdos|gpt-bios|gpt\n";
# set the disk label - actually not only the above, but all types
# supported by parted could be allowed, but others are not implemented
# yet
- $FAI::configs{$FAI::device}{disklabel} = $1;
+ $FAI::configs{$FAI::device}{disklabel} = $dl;
}
| /^bootable:(\d+)/
{
More information about the Fai-commit
mailing list