V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 53s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-07-30 09:52:03 +02:00
parent 5af9f25f69
commit a79603b40a
2 changed files with 29 additions and 24 deletions

View File

@@ -172,7 +172,10 @@ mount_partition() {
var_mount_options=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev_part}.mount.options" "${VAR_SETUP_PART}")
var_mount_optsnap=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev_part}.mount.optsnap" "${VAR_SETUP_PART}")
if [[ "${ARY_CRYPT_MOUNT_PATHS[*]}" == *"${var_mount_path}"* ]]; then
var_encryption_label=$(get_label "${var_mount_path}" "${var_fs_version}" "luks")
fi
var_fs_uuid="${HMP_PATH_FSUUID["${var_mount_path}"]}"
if [[ -z "${var_fs_uuid}" ]]; then

View File

@@ -24,9 +24,9 @@ guard_sourcing
# Prints resulting label to stdout.
#######################################
get_label() {
declare -r var_path="${1,,}"
declare -r var_file="${2,,}"
declare -r var_kind="${3,,}"
declare var_path="${1,,}"
declare var_file="${2,,}"
declare var_kind="${3,,}"
### Normalize 'mount.path': remove leading slash and replace slashes with underscore.
declare var_return_label=""
@@ -71,8 +71,10 @@ get_label() {
/boot/efi:*) var_return_label="ESP" ;;
/var/log/audit:ext4) var_return_label="ext4_var_audit" ;;
*:ext4) var_return_label="ext4_${var_normalized}"
var_return_label="${var_return_label:0:16}"
if (( ${#var_return_label} > 16 )); then
do_log "warn" "file_only" "3295() Label: '${var_return_label}' of type: '${var_kind}' created for: '${var_path}' exceeds 16 chars, truncating."
var_return_label="${var_return_label:0:16}"
fi
;;
*:btrfs) var_return_label="btrfs_${var_normalized}" ;;
*:*) var_return_label="${var_file}_${var_normalized}" ;;