[Fai-commit] r5250 - people/michael/experimental/patches
mt at alioth.debian.org
mt at alioth.debian.org
Sun Feb 8 12:31:49 UTC 2009
Author: mt
Date: 2009-02-08 12:31:49 +0000 (Sun, 08 Feb 2009)
New Revision: 5250
Added:
people/michael/experimental/patches/setup-storage_crypto-for-all-mountspecs
Modified:
people/michael/experimental/patches/series
people/michael/experimental/patches/setup-storage_raid0-has-no-spares
Log:
- added patch to support :encrypt on all mountpoint specifications
- fixed bug in RAID0 patch
Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series 2009-02-07 16:40:51 UTC (rev 5249)
+++ people/michael/experimental/patches/series 2009-02-08 12:31:49 UTC (rev 5250)
@@ -16,3 +16,4 @@
setup-storage_no-useless-udevsettle
aoe-support
setup-storage_bugfix-virtual
+setup-storage_crypto-for-all-mountspecs
Added: people/michael/experimental/patches/setup-storage_crypto-for-all-mountspecs
===================================================================
--- people/michael/experimental/patches/setup-storage_crypto-for-all-mountspecs (rev 0)
+++ people/michael/experimental/patches/setup-storage_crypto-for-all-mountspecs 2009-02-08 12:31:49 UTC (rev 5250)
@@ -0,0 +1,40 @@
+2009-02-08 Michael Tautschnig <mt at debian.org>
+
+ * lib/setup-storage/Parser.pm: Support :encrypt with all mountpoint
+ specifications
+Index: trunk/lib/setup-storage/Parser.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Parser.pm
++++ trunk/lib/setup-storage/Parser.pm
+@@ -510,27 +510,15 @@
+ $FAI::partition_pointer = (\%FAI::configs)->{$FAI::device}->{volumes}->{$2};
+ }
+
+- mountpoint: '-'
+- {
+- # this partition should not be mounted
+- $FAI::partition_pointer->{mountpoint} = "-";
+- $FAI::partition_pointer->{encrypt} = 0;
+- }
+- | 'swap'
+- {
+- # this partition is swap space, not mounted
+- $FAI::partition_pointer->{mountpoint} = "none";
+- $FAI::partition_pointer->{encrypt} = 0;
+- }
+- | m{^/\S*}
++ mountpoint: m{^(-|swap|/[^\s\:]*)(:encrypt)}
+ {
+ # set the mount point, may include encryption-request
+- if ($item[ 1 ] =~ m{^(/[^:]*):encrypt$}) {
++ $FAI::partition_pointer->{mountpoint} = $1;
++ $FAI::partition_pointer->{mountpoint} = "none" if ($1 eq "swap");
++ if (defined($2)) {
+ &FAI::in_path("cryptsetup") or die "cryptsetup not found in PATH\n";
+- $FAI::partition_pointer->{mountpoint} = $1;
+ $FAI::partition_pointer->{encrypt} = 1;
+ } else {
+- $FAI::partition_pointer->{mountpoint} = $item[ 1 ];
+ $FAI::partition_pointer->{encrypt} = 0;
+ }
+ }
Modified: people/michael/experimental/patches/setup-storage_raid0-has-no-spares
===================================================================
--- people/michael/experimental/patches/setup-storage_raid0-has-no-spares 2009-02-07 16:40:51 UTC (rev 5249)
+++ people/michael/experimental/patches/setup-storage_raid0-has-no-spares 2009-02-08 12:31:49 UTC (rev 5250)
@@ -25,7 +25,7 @@
($2 =~ /spare/) and $spare = 1;
($2 =~ /missing/) and $missing = 1;
}
-+ (($spare == 1 || $missing == 1) && $FAI::configs{RAID}{volumes}{$vol_id}{mode} == 0)
++ (($spare == 1 || $missing == 1) && $FAI::partition_pointer->{mode} == 0)
+ and die "RAID-0 does not support spares or missing devices\n";
if ($missing) {
die "Failed to resolve $dev to a unique device name\n" if (scalar(@candidates) > 1);
More information about the Fai-commit
mailing list