[Fai-commit] r6081 - branches/experimental/patches
Michael Tautschnig
mt at alioth.debian.org
Sat Sep 25 11:43:00 UTC 2010
Author: mt
Date: 2010-09-25 11:42:59 +0000 (Sat, 25 Sep 2010)
New Revision: 6081
Modified:
branches/experimental/patches/setup-storage_preserve-format-all
branches/experimental/patches/setup-storage_raw-disk
Log:
make preserve_always:all disable all parted operations on the respective disk
Modified: branches/experimental/patches/setup-storage_preserve-format-all
===================================================================
--- branches/experimental/patches/setup-storage_preserve-format-all 2010-09-25 11:34:06 UTC (rev 6080)
+++ branches/experimental/patches/setup-storage_preserve-format-all 2010-09-25 11:42:59 UTC (rev 6081)
@@ -1,8 +1,10 @@
2010-09-17 Michael Tautschnig <mt at debian.org>
* setup-storage/Parser.pm: Added "all" as valid value for preserve_always,
- preserve_reinstall, resize, always_format with the same semantics as
- specifying each device index separately (suggested by Toomas Tamm).
+ preserve_reinstall, resize, always_format with the same semantics as
+ specifying each device index separately; in addition, preserve_always:all
+ makes sure no parted operations on that disk happen at all (suggested by
+ Toomas Tamm).
* setup-storage.8: Document this extension.
Index: trunk/lib/setup-storage/Parser.pm
===================================================================
@@ -448,3 +450,17 @@
.br
/* attempt to resize partitions */
.br
+Index: trunk/lib/setup-storage/Commands.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Commands.pm
++++ trunk/lib/setup-storage/Commands.pm
+@@ -1102,6 +1102,9 @@
+ # no partition table operations
+ $FAI::partition_table_deps{$disk} = "";
+ }
++ } elsif (defined($FAI::configs{$config}{opts_all}{preserve})) {
++ # no changes on this disk
++ $FAI::partition_table_deps{$disk} = "";
+ } else {
+ # create partitions on non-virtual configs
+ &FAI::setup_partitions($config);
Modified: branches/experimental/patches/setup-storage_raw-disk
===================================================================
--- branches/experimental/patches/setup-storage_raw-disk 2010-09-25 11:34:06 UTC (rev 6080)
+++ branches/experimental/patches/setup-storage_raw-disk 2010-09-25 11:42:59 UTC (rev 6081)
@@ -22,10 +22,10 @@
+ } elsif (defined($FAI::configs{$config}{partitions}{0})) {
+ # no partition table operations
+ $FAI::partition_table_deps{$disk} = "";
- } else {
- # create partitions on non-virtual configs
- &FAI::setup_partitions($config);
-@@ -1118,7 +1119,7 @@
+ } elsif (defined($FAI::configs{$config}{opts_all}{preserve})) {
+ # no changes on this disk
+ $FAI::partition_table_deps{$disk} = "";
+@@ -1121,7 +1122,7 @@
|| $part->{size}->{extended} == 1);
# create the filesystem on the device
More information about the Fai-commit
mailing list