diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2010-05-10 16:13:37 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2010-05-10 16:13:37 +0000 |
commit | 0f37cd56a30c18634ecc194645acaad13fface95 (patch) | |
tree | bc9cbdd37b2df32a0ee08c698fa2ee2224d0cb56 | |
parent | 5ace2782ab7177124a0fb2f3ad8f8e8fbeba399e (diff) | |
download | drakx-0f37cd56a30c18634ecc194645acaad13fface95.tar drakx-0f37cd56a30c18634ecc194645acaad13fface95.tar.gz drakx-0f37cd56a30c18634ecc194645acaad13fface95.tar.bz2 drakx-0f37cd56a30c18634ecc194645acaad13fface95.tar.xz drakx-0f37cd56a30c18634ecc194645acaad13fface95.zip |
do not ask to reboot after resizing active LUKS if not mounted
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 6 |
1 files changed, 6 insertions, 0 deletions
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; }; |