From e6d1a723335238323f8289cca7a3bce50f0aa4dc Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 10 Jun 2020 11:10:40 +0100 Subject: diskdrake: remove partition from /etc/crypttab when deleted (mga#25891) --- perl-install/fs/dmcrypt.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'perl-install/fs') 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 { -- cgit v1.2.1