From 20037ac9cb9dff878ebd0fcf60a3efde70ae7594 Mon Sep 17 00:00:00 2001 From: illiliti Date: Wed, 19 Feb 2020 10:12:37 +0300 Subject: [PATCH] luks_name --- config | 3 +++ init | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config b/config index 26a44f4..60d677b 100644 --- a/config +++ b/config @@ -62,6 +62,9 @@ luks=1 # LUKS encrypted root ( device,partuuid,uuid,label ) luks_root="PARTUUID=b04395be-f467-458b-8630-9a429b487600" +# luks mapper name ( /dev/mapper/) +#luks_name="" + # LUKS detached header #luks_header="/path/to/header" diff --git a/init b/init index 979a2a5..807a720 100644 --- a/init +++ b/init @@ -82,8 +82,7 @@ findfs_sh() { } unlock_luks() { - # TODO improve mapper name ( crypttab or config option ) - cryptsetup $luks_args luksOpen $(findfs_sh "$luks_root") luks_root || panic "failed to unlock luks container" + cryptsetup $luks_args luksOpen $(findfs_sh "$luks_root") ${luks_name:-luks_root} || panic "failed to unlock luks container" } trigger_lvm() {