2020-06-28 09:28:57 +05:30
|
|
|
# vim: set ft=sh:
|
2020-07-03 21:19:09 +05:30
|
|
|
# shellcheck shell=sh
|
|
|
|
#
|
2021-07-31 22:50:16 +05:30
|
|
|
# https://shellcheck.net/wiki/SC2154
|
2020-07-03 21:19:09 +05:30
|
|
|
# shellcheck disable=2154
|
2020-06-28 09:28:57 +05:30
|
|
|
|
2020-09-11 01:23:39 +05:30
|
|
|
mkdir -p /run/cryptsetup
|
2020-06-28 09:28:57 +05:30
|
|
|
|
2020-09-11 01:23:39 +05:30
|
|
|
resolve_device "$luks_root"
|
2020-06-28 09:28:57 +05:30
|
|
|
|
2021-05-10 16:53:34 +05:30
|
|
|
DM_DISABLE_UDEV=1 cryptsetup open \
|
2021-06-24 06:46:27 +05:30
|
|
|
${luks_discard:+--allow-discards} \
|
2021-07-04 18:23:47 +05:30
|
|
|
${luks_header:+--header="$luks_header"} \
|
|
|
|
${luks_key:+--key-file="$luks_key"} -- "$device" \
|
2021-05-10 16:53:34 +05:30
|
|
|
"${luks_name:-crypt-${device##*/}}" || panic "failed to unlock LUKS"
|