V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 48s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 48s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -41,9 +41,9 @@ write_crypttab() {
|
||||
# HMP_PATH_FSUUID
|
||||
# HMP_PATH_LUKSUUID
|
||||
# TARGET
|
||||
# VAR_DROPBEAR
|
||||
# VAR_NUKE
|
||||
# VAR_VERSION
|
||||
# dropbear_boot
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
@@ -53,6 +53,8 @@ generate_crypttab() {
|
||||
### Declare Arrays, HashMaps, and Variables.
|
||||
declare var_key="" var_encryption_label="" var_luks_uuid="" var_ephemeral_enclabel="" var_host_uuid=""
|
||||
|
||||
ensure_lowercase "VAR_DROPBEAR"
|
||||
|
||||
### Generate '${TARGET}/etc/crypttab' header.
|
||||
: >| "${TARGET}/etc/crypttab"
|
||||
chmod 0600 "${TARGET}/etc/crypttab"
|
||||
@@ -94,9 +96,17 @@ EOF
|
||||
var_encryption_label="${HMP_PATH_ENCLABEL["${var_key}"]}"
|
||||
var_luks_uuid="${HMP_PATH_LUKSUUID["${var_key}"]}"
|
||||
|
||||
if [[ "${dropbear_boot,,}" == "true" ]]; then
|
||||
if [[ "${VAR_DROPBEAR}" == "true" ]]; then
|
||||
|
||||
write_crypttab "${var_encryption_label}" "UUID=${var_luks_uuid}" "none" "luks,discard,initramfs"
|
||||
if [[ "${var_key}" == "/" ]]; then
|
||||
|
||||
write_crypttab "${var_encryption_label}" "UUID=${var_luks_uuid}" "none" "luks,discard,initramfs,keyscript=/lib/cryptsetup/scripts/unlock_wrapper.sh"
|
||||
|
||||
else
|
||||
|
||||
write_crypttab "${var_encryption_label}" "UUID=${var_luks_uuid}" "none" "luks,discard,initramfs"
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
|
||||
Reference in New Issue
Block a user