summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-06-10 11:10:40 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-06-10 11:24:13 +0100
commite6d1a723335238323f8289cca7a3bce50f0aa4dc (patch)
tree3fcbe0375be4b19a3c2781bd436240010f82c33a
parentc40e6d9c9f5b7122858cb05e2c6021d6f122bcf5 (diff)
downloaddrakx-e6d1a723335238323f8289cca7a3bce50f0aa4dc.tar
drakx-e6d1a723335238323f8289cca7a3bce50f0aa4dc.tar.gz
drakx-e6d1a723335238323f8289cca7a3bce50f0aa4dc.tar.bz2
drakx-e6d1a723335238323f8289cca7a3bce50f0aa4dc.tar.xz
drakx-e6d1a723335238323f8289cca7a3bce50f0aa4dc.zip
diskdrake: remove partition from /etc/crypttab when deleted (mga#25891)
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/fs/dmcrypt.pm6
2 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index fc68aedea..ec4516086 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- diskdrake: remove partition from /etc/crypttab when deleted (mga#25891)
+
Version 18.28 - 29 May 2020
- drakboot: don't die in write_grub2 if grub.cfg doesn't exist (mga#26676)
diff --git a/perl-install/fs/dmcrypt.pm b/perl-install/fs/dmcrypt.pm
index eddf669ef..21175c2de 100644
--- a/perl-install/fs/dmcrypt.pm
+++ b/perl-install/fs/dmcrypt.pm
@@ -137,6 +137,12 @@ sub close_part {
_run_or_die('luksClose', devices::make($dm_part->{device}));
$part->{dm_active} = 0;
@$dmcrypts = grep { $_ != $dm_part } @$dmcrypts;
+ substInFile {
+ my ($name, $_dev) = split;
+ if ($name eq $part->{dm_name}) {
+ $_ = '';
+ }
+ } _crypttab();
}
sub _run_or_die {