summaryrefslogtreecommitdiffstats
path: root/perl-install/fs
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 /perl-install/fs
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)
Diffstat (limited to 'perl-install/fs')
-rw-r--r--perl-install/fs/dmcrypt.pm6
1 files changed, 6 insertions, 0 deletions
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 {