Mageia Bugzilla – Attachment 3767 Details for
Bug 5661
Can not unlock encrypted /home on my LVM to use it (need to write /etc/crypttab)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
eg: for detecting lvms on top of dmcrypt
5661-3c.diff (text/plain), 748 bytes, created by
Thierry Vignaud
on 2013-04-19 08:00:04 CEST
(
hide
)
Description:
eg: for detecting lvms on top of dmcrypt
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2013-04-19 08:00:04 CEST
Size:
748 bytes
patch
obsolete
>diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm >index 8a4d9bb..d9093e2 100644 >--- a/perl-install/diskdrake/interactive.pm >+++ b/perl-install/diskdrake/interactive.pm >@@ -954,8 +954,17 @@ sub dmcrypt_open { > delete $part->{dmcrypt_key}; > die(($? >> 8) == 255 ? N("Invalid key") : $@); > } >- # Detect LVMs on top of dmcrypt >+ detect_lvms_on_dmcrypt($all_hds); >+} >+ >+# Detect LVMs on top of dmcrypt >+sub detect_lvms_on_dmcrypt { >+ my ($all_hds) = @_, >+ my $tmp_file = '/tmp/crypttab'; >+ fs::dmcrypt::save_crypttab_($all_hds, $tmp_file); > $all_hds->{lvms} = [ fsedit::lvms($all_hds) ]; >+ fs::dmcrypt::read_crypttab_($all_hds, $tmp_file); >+ rm_rf($tmp_file); > } > > sub Add2RAID {
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index 8a4d9bb..d9093e2 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -954,8 +954,17 @@ sub dmcrypt_open { delete $part->{dmcrypt_key}; die(($? >> 8) == 255 ? N("Invalid key") : $@); } - # Detect LVMs on top of dmcrypt + detect_lvms_on_dmcrypt($all_hds); +} + +# Detect LVMs on top of dmcrypt +sub detect_lvms_on_dmcrypt { + my ($all_hds) = @_, + my $tmp_file = '/tmp/crypttab'; + fs::dmcrypt::save_crypttab_($all_hds, $tmp_file); $all_hds->{lvms} = [ fsedit::lvms($all_hds) ]; + fs::dmcrypt::read_crypttab_($all_hds, $tmp_file); + rm_rf($tmp_file); } sub Add2RAID {
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 5661
:
3597
|
3626
|
3644
|
3757
|
3758
|
3759
|
3761
|
3762
|
3763
|
3765
|
3766
| 3767 |
3811
|
3812