[kernel] r15473 - dists/sid/linux-2.6/debian
Ben Hutchings
benh at alioth.debian.org
Sat Apr 3 02:38:15 UTC 2010
Author: benh
Date: Sat Apr 3 02:38:13 2010
New Revision: 15473
Log:
linux-base: Convert disk IDs in crypttab (Closes: #575056)
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/linux-base.postinst
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Fri Apr 2 16:55:32 2010 (r15472)
+++ dists/sid/linux-2.6/debian/changelog Sat Apr 3 02:38:13 2010 (r15473)
@@ -19,6 +19,7 @@
- Always if $DEBCONF_RECONFIGURE is set
- Never during a fresh installation (Closes: #576243)
* phylib: Support PHY module autoloading (Closes: #553024)
+ * linux-base: Convert disk IDs in crypttab (Closes: #575056)
[ maximilian attems]
* [alpha, hppa] Disable oprofile as tracing code is unsupported here.
Modified: dists/sid/linux-2.6/debian/linux-base.postinst
==============================================================================
--- dists/sid/linux-2.6/debian/linux-base.postinst Fri Apr 2 16:55:32 2010 (r15472)
+++ dists/sid/linux-2.6/debian/linux-base.postinst Sat Apr 3 02:38:13 2010 (r15473)
@@ -815,6 +815,53 @@
}
}
+# cryptsetup
+
+sub cryptsetup_next {
+ my ($file) = @_;
+ my $text = <$file>;
+ unless (defined($text)) {
+ return ();
+ }
+
+ my $line = $text;
+ if ($line =~ /^\s*(#|$)/) {
+ return ($text);
+ } else {
+ $line =~ s/\s*$//;
+ $line =~ s/^\s*//;
+ return ($text, split(/\s+/, $line, 4));
+ }
+}
+
+sub cryptsetup_list {
+ my ($file) = @_;
+ my (@results) = ();
+
+ while (1) {
+ my ($text, undef, $src) = cryptsetup_next($file);
+ last unless defined($text);
+ if (defined($src)) {
+ push @results, $src;
+ }
+ }
+
+ return @results;
+}
+
+sub cryptsetup_update {
+ my ($old, $new, $map) = @_;
+
+ while (1) {
+ my ($text, $dst, $src, $key, $opts) = cryptsetup_next($old);
+ last unless defined($text);
+ if (defined($src) && defined($map->{$src})) {
+ $text = "# $text" . join(' ', $dst, $map->{$src}, $key, $opts);
+ }
+ $new->print($text);
+ }
+}
+
### list of all configuration files and functions
my @config_files = ({packages => 'mount',
@@ -887,7 +934,11 @@
{packages => 'uswsusp',
path => '/etc/uswsusp.conf',
list => \&uswsusp_resume_list,
- update => \&uswsusp_resume_update});
+ update => \&uswsusp_resume_update},
+ {packages => 'cryptsetup',
+ path => '/etc/crypttab',
+ list => \&cryptsetup_list,
+ update => \&cryptsetup_update});
### Filesystem labels and UUIDs
More information about the Kernel-svn-changes
mailing list