From 0f37cd56a30c18634ecc194645acaad13fface95 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Mon, 10 May 2010 16:13:37 +0000 Subject: do not ask to reboot after resizing active LUKS if not mounted --- perl-install/diskdrake/interactive.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'perl-install/diskdrake') diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index a1e2f345f..0c6421b8e 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -851,10 +851,16 @@ sub Resize { if (isLVM($hd)) { lvm::lv_resize($low_part, $oldsize); } else { + if ($write_partitions && isLUKS($part)) { + run_program::run('cryptsetup', 'luksClose', $part->{dmcrypt_name}) or die ("Failed to resize partition, maybe it is mounted"); + } partition_table::will_tell_kernel($hd, resize => $low_part); partition_table::adjust_local_extended($hd, $low_part); partition_table::adjust_main_extended($hd); write_partitions($in, $hd) or return if $write_partitions && %nice_resize; + if ($write_partitions && isLUKS($part)) { + fs::dmcrypt::open_part([], $low_part); + } } 1; }; -- cgit v1.2.1