File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3012,11 +3012,19 @@ public class Main : GLib.Object{
30123012 // check and add entries for mapped devices which are encrypted
30133013
30143014 foreach (var mnt in mount_list){
3015- if ((mnt. device != null ) && (mnt. device. parent != null ) && (mnt. device. is_on_encrypted_partition())){
3016-
3015+ if ((mnt. device != null ) && (mnt. device. parent != null )
3016+ && ((mnt. device. is_on_encrypted_partition())
3017+ || ((mnt. device. parent. parent != null ) &&
3018+ (mnt. device. parent. is_on_encrypted_partition())))){
3019+
3020+ // We could be either directly on LUKS or on LVM-on-LUKS,
3021+ // so be sure to get the top-level LUKS UUID.
3022+ var crypt_parent = (mnt. device. is_on_encrypted_partition()) ?
3023+ mnt. device. parent. uuid : mnt. device. parent. parent. uuid;
3024+
30173025 // find existing
30183026 var entry = CryptTabEntry . find_entry_by_uuid(
3019- crypttab_list, mnt . device . parent . uuid );
3027+ crypttab_list, crypt_parent );
30203028
30213029 // add if missing
30223030 if (entry == null ){
@@ -3025,8 +3033,8 @@ public class Main : GLib.Object{
30253033 }
30263034
30273035 // set custom values
3028- entry. device_uuid = mnt . device . parent . uuid ;
3029- entry. mapped_name = " luks-%s " . printf(mnt . device . parent . uuid );
3036+ entry. device_uuid = crypt_parent ;
3037+ entry. mapped_name = " luks-%s " . printf(crypt_parent );
30303038 entry. keyfile = " none" ;
30313039 entry. options = " luks,nofail" ;
30323040 }
You can’t perform that action at this time.
0 commit comments