[Fai-commit] r4985 - trunk/lib/setup-storage
lange at alioth.debian.org
lange at alioth.debian.org
Fri Jun 13 15:02:40 UTC 2008
Author: lange
Date: 2008-06-13 15:02:39 +0000 (Fri, 13 Jun 2008)
New Revision: 4985
Modified:
trunk/lib/setup-storage/Commands.pm
Log:
fix and document problem, when only tuneopts are defined,
prevent warnings about uninitialized variables
Modified: trunk/lib/setup-storage/Commands.pm
===================================================================
--- trunk/lib/setup-storage/Commands.pm 2008-06-13 14:22:36 UTC (rev 4984)
+++ trunk/lib/setup-storage/Commands.pm 2008-06-13 15:02:39 UTC (rev 4985)
@@ -56,7 +56,19 @@
my ($create_options) = $partition->{fs_options} =~ m/createopts="([^"]+)"/;
my ($tune_options) = $partition->{fs_options} =~ m/tuneopts="([^"]+)"/;
- $create_options = $partition->{fs_options} unless $create_options;
+
+ # this enables the use of all remaining options as create option if
+ # you did not specify createopts= Example: -m0 -i0 will then be used
+ # as createopts. This fails if you do only specify tuneopts without
+ # using createopts. Therefore is disable this feature. IMO this
+ # special behaviour is also not documented in setup-storage.8
+ # T.Lange
+ # $create_options = $partition->{fs_options} unless $create_options;
+
+ # prevent warnings of uninitialized variables
+ $create_options = '' unless $create_options;
+ $tune_options = '' unless $tune_options;
+
print "$partition->{mountpoint} create_options: $create_options\n" if ($FAI::debug && $create_options);
print "$partition->{mountpoint} tune_options: $tune_options\n" if ($FAI::debug && $tune_options);
More information about the Fai-commit
mailing list