[Fai-commit] r5327 - in trunk: debian lib/setup-storage
Michael Tautschnig
mt at alioth.debian.org
Wed Apr 15 21:14:26 UTC 2009
Author: mt
Date: 2009-04-15 21:14:26 +0000 (Wed, 15 Apr 2009)
New Revision: 5327
Modified:
trunk/debian/changelog
trunk/lib/setup-storage/Parser.pm
trunk/lib/setup-storage/Sizes.pm
Log:
Merged patches setup-storage_cylinder-boundary and setup-storage_fs-tool-check
into trunk, updated changelog accordingly
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-04-15 09:40:16 UTC (rev 5326)
+++ trunk/debian/changelog 2009-04-15 21:14:26 UTC (rev 5327)
@@ -86,8 +86,12 @@
* man/setup-storage.8: Documented these new options
* Moved parsing of createopts,tuneopts to Parser.pm for simpler code and
better syntax checking (closes: #521172)
+ * setup-storage/Sizes.pm: Change die to warn in case a preserved partition
+ is not aligned to cylinder boundaries
+ * setup-storage/Parser.pm: Only test for mkfs.X if such a filesystem is to
+ be created (i.e., it will not be preserved)
- -- Thomas Lange <lange at debian.org> Wed, 15 Apr 2009 10:55:11 +0200
+ -- Thomas Lange <lange at debian.org> Wed, 15 Apr 2009 23:13:31 +0200
fai (3.2.17) unstable; urgency=medium
Modified: trunk/lib/setup-storage/Parser.pm
===================================================================
--- trunk/lib/setup-storage/Parser.pm 2009-04-15 09:40:16 UTC (rev 5326)
+++ trunk/lib/setup-storage/Parser.pm 2009-04-15 21:14:26 UTC (rev 5327)
@@ -664,9 +664,17 @@
}
| /^\S+/
{
- &FAI::in_path("mkfs.$item[1]") or
- die "unknown/invalid filesystem type $item[1] (mkfs.$item[1] not found in PATH)\n";
$FAI::partition_pointer->{filesystem} = $item[ 1 ];
+ my $to_be_preserved = 0;
+ if ($FAI::device eq "RAID") {
+ $to_be_preserved = $FAI::partition_pointer->{preserve};
+ } else {
+ $to_be_preserved = $FAI::partition_pointer->{size}->{preserve};
+ }
+ if (0 == $to_be_preserved) {
+ &FAI::in_path("mkfs.$item[1]") or
+ die "unknown/invalid filesystem type $item[1] (mkfs.$item[1] not found in PATH)\n";
+ }
}
vgcreateopt: /pvcreateopts="([^"]*)"/
Modified: trunk/lib/setup-storage/Sizes.pm
===================================================================
--- trunk/lib/setup-storage/Sizes.pm 2009-04-15 09:40:16 UTC (rev 5326)
+++ trunk/lib/setup-storage/Sizes.pm 2009-04-15 21:14:26 UTC (rev 5327)
@@ -323,11 +323,14 @@
if ($FAI::configs{$config}{disklabel} eq "msdos") {
# make sure the partition ends at a cylinder boundary
+ # maybe we should make this a warning if ($curr_part->{filesystem} eq
+ # "ntfs")) only, but for now just a warning for everyone; well, it might
+ # also be safe to ignore this, don't know for sure.
(0 == ($curr_part->{end_byte} + 1)
% ($current_disk->{sector_size} *
$current_disk->{bios_sectors_per_track} *
$current_disk->{bios_heads})) or
- die "Preserved partition $part_id does not end at a cylinder boundary\n";
+ warn "Preserved partition $part_id does not end at a cylinder boundary, parted may fail to restore the partition!\n";
# add one head of disk usage if this is a logical partition
$min_req_total_space += $current_disk->{bios_sectors_per_track} *
More information about the Fai-commit
mailing list