V8.00.000.2025.06.17
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:
2025-07-24 23:01:23 +02:00
parent 1983e0229f
commit c026d9a324
48 changed files with 269 additions and 284 deletions

View File

@@ -42,11 +42,11 @@ partitioning() {
### All current data for the respective device will be deleted.
if ! blkdiscard "/dev/${var_dev}"; then
do_log "fatal" "false" "Partition table deletion '/dev/${var_dev}' failed."
do_log "fatal" "file_only" "Partition table deletion '/dev/${var_dev}' failed."
return "${ERR_TABLE_DELETE}"
fi
do_log "info" "false" "Partition table of '/dev/${var_dev}' discarded."
do_log "info" "file_only" "Partition table of '/dev/${var_dev}' discarded."
case "${VAR_RECIPE_TABLE,,}" in
@@ -55,10 +55,10 @@ partitioning() {
do_log "fatal" "false" "Partition table creation '/dev/${var_dev}' failed."
return "${ERR_TABLE_CREATE}"
fi
do_log "info" "false" "Partition table '${VAR_RECIPE_TABLE}' of '/dev/${var_dev}' generated."
do_log "info" "file_only" "Partition table '${VAR_RECIPE_TABLE}' of '/dev/${var_dev}' generated."
;;
*)
do_log "fatal" "false" "No valid partition table chosen. String was '${VAR_RECIPE_TABLE}'."
do_log "fatal" "file_only" "No valid partition table chosen. String was '${VAR_RECIPE_TABLE}'."
return "${ERR_PARTITIONTBL}"
;;
@@ -85,22 +85,22 @@ partitioning() {
fi
if ! parted -s "/dev/${var_dev}" mkpart "${var_pri}" "${var_fs}" "${var_begin}" "${var_end_arg}"; then
do_log "fatal" "false" "Partition creation '/dev/${var_dev}${var_part}' failed."
do_log "fatal" "file_only" "Partition creation '/dev/${var_dev}${var_part}' failed."
return "${ERR_PART_CREATE}"
fi
do_log "info" "false" "Partition generated: '${var_part}' | on device '/dev/${var_dev}' | begin: '${var_begin}' | end: '${var_end_arg}'."
do_log "info" "file_only" "Partition generated: '${var_part}' | on device '/dev/${var_dev}' | begin: '${var_begin}' | end: '${var_end_arg}'."
### Set the bootable flag if necessary.
if [[ "${var_boot,,}" == "true" ]]; then
parted -s "/dev/${var_dev}" set "${var_part}" boot on
do_log "info" "false" "Partition: '/dev/${var_dev}${var_part}' marked as bootable."
do_log "info" "file_only" "Partition: '/dev/${var_dev}${var_part}' marked as bootable."
fi
### Store UUID of the partition.
var_uuid=$(blkid -s UUID -o value "/dev/${var_dev}${var_part}")
if [[ -z "${var_uuid}" ]]; then
do_log "fatal" "false" "WARNING: could not read UUID for '/dev/${var_dev}${var_part}'."
do_log "fatal" "file_only" "WARNING: could not read UUID for '/dev/${var_dev}${var_part}'."
return "${ERR_PART_READ}"
else
HMP_PATH_PARTUUID["UUID_${var_mount_path}"]="${var_uuid}"