V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 39s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 39s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -96,18 +96,18 @@ partition_encryption() {
|
||||
SWAP|/tmp)
|
||||
|
||||
mkfs.ext4 -L "${var_filesystem_label}" "/dev/${var_dev}${var_part}" 1M
|
||||
do_log "info" "true" "Ephemeral: '${var_mount_path}' prepared on: '/dev/${var_dev}${var_part}'."
|
||||
do_log "info" "file_only" "Ephemeral: '${var_mount_path}' prepared on: '/dev/${var_dev}${var_part}'."
|
||||
|
||||
HMP_EPHEMERAL_DEV["${var_mount_path}"]="/dev/${var_dev}${var_part}"
|
||||
HMP_EPHEMERAL_ENCLABEL["${var_mount_path}"]="${var_encryption_label}"
|
||||
HMP_EPHEMERAL_FS_LABEL["${var_mount_path}"]="${var_filesystem_label}"
|
||||
do_log "info" "true" "Stored in HashMap [HMP_EPHEMERAL_DEV] : '${var_mount_path}' -> '${HMP_EPHEMERAL_DEV["${var_mount_path}"]}'"
|
||||
do_log "info" "true" "Stored in HashMap [HMP_EPHEMERAL_ENCLABEL]: '${var_mount_path}' -> '${HMP_EPHEMERAL_ENCLABEL["${var_mount_path}"]}'"
|
||||
do_log "info" "file_only" "Stored in HashMap [HMP_EPHEMERAL_DEV] : '${var_mount_path}' -> '${HMP_EPHEMERAL_DEV["${var_mount_path}"]}'"
|
||||
do_log "info" "file_only" "Stored in HashMap [HMP_EPHEMERAL_ENCLABEL]: '${var_mount_path}' -> '${HMP_EPHEMERAL_ENCLABEL["${var_mount_path}"]}'"
|
||||
continue
|
||||
;;
|
||||
|
||||
*)
|
||||
do_log "error" "true" "Invalid mount path: '${var_mount_path}' for partition: '/dev/${var_dev}${var_part}'."
|
||||
do_log "error" "file_only" "Invalid mount path: '${var_mount_path}' for partition: '/dev/${var_dev}${var_part}'."
|
||||
continue
|
||||
;;
|
||||
|
||||
@@ -119,16 +119,16 @@ partition_encryption() {
|
||||
|
||||
if [[ "${var_encryption_integrity,,}" == "true" ]]; then
|
||||
|
||||
do_log "info" "true" "Partition: '/dev/${var_dev}${var_part}' dm-integrity encrypted."
|
||||
do_log "info" "file_only" "Partition: '/dev/${var_dev}${var_part}' dm-integrity encrypted."
|
||||
|
||||
else
|
||||
|
||||
do_log "info" "true" "Partition: '/dev/${var_dev}${var_part}' encrypted."
|
||||
do_log "info" "file_only" "Partition: '/dev/${var_dev}${var_part}' encrypted."
|
||||
|
||||
fi
|
||||
|
||||
cryptsetup luksHeaderBackup --header-backup-file="${DIR_BAK}/luks_header_${var_dev}${var_part}.bak" "/dev/${var_dev}${var_part}"
|
||||
do_log "info" "true" "Partition: '/dev/${var_dev}${var_part}' LUKS Header saved: '${DIR_BAK}/luks_header_${var_dev}${var_part}.bak'."
|
||||
do_log "info" "file_only" "Partition: '/dev/${var_dev}${var_part}' LUKS Header saved: '${DIR_BAK}/luks_header_${var_dev}${var_part}.bak'."
|
||||
|
||||
### Opening encrypted container.
|
||||
if [[ "${var_mount_path,,}" == "/boot" ]]; then
|
||||
@@ -140,7 +140,7 @@ partition_encryption() {
|
||||
--key-file="${DIR_CNF}/password_luks_common.txt" \
|
||||
"${var_encryption_label}"
|
||||
fi
|
||||
do_log "info" "true" "Partition: '/dev/${var_dev}${var_part}' opened as '/dev/mapper/${var_encryption_label}'."
|
||||
do_log "info" "file_only" "Partition: '/dev/${var_dev}${var_part}' opened as '/dev/mapper/${var_encryption_label}'."
|
||||
|
||||
### Store UUID of the LUKS container.
|
||||
var_uuid=$(blkid -s UUID -o value "/dev/mapper/${var_encryption_label}")
|
||||
|
||||
Reference in New Issue
Block a user