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

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-10-11 22:14:22 +01:00
parent be0a6c7c6a
commit 353568eb69
60 changed files with 2267 additions and 1163 deletions

View File

@@ -43,23 +43,28 @@ guard_sourcing
# - LUKS encryption enabled.
# - Specific device partition data for each mount path.
# Globals:
# ARY_CRYPT_MOUNT_PATHS
# ARY_FORMT_MOUNT_PATHS
# ARY_FSTAB_MOUNT_PATHS
# ARY_PATHS_SORTED
# DIR_LOG
# HMP_FSTAB_MOUNT_FTYPE
# HMP_PATH_DEV_PART
# HMP_PATH_PARTUUID
# VAR_RECIPE_FIRMWARE
# VAR_RECIPE_STRING
# VAR_RECIPE_TABLE
# VAR_ROOT_FS
# VAR_SETUP_PART
# Arguments:
# None
# Returns:
# ERR_PARTITIONTBL
# ERR_PART_CREATE
# ERR_PART_READ
# ERR_TABLE_CREATE
# ERR_TABLE_DELETE
# 0: on success
# ERR_PARTITIONTBL: on failure
# ERR_PART_CREATE: on failure
# ERR_PART_READ: on failure
# ERR_TABLE_CREATE: on failure
# ERR_TABLE_DELETE: on failure
#######################################
partitioning() {
### Declare Arrays, HashMaps, and Variables.
@@ -180,6 +185,7 @@ partitioning() {
var_end_arg="${var_end}"
fi
# shellcheck disable=SC2249
case "${VAR_RECIPE_TABLE,,}" in
gpt)
@@ -212,6 +218,7 @@ partitioning() {
### Assign the correct GPT typecode via sgdisk if the table is GPT.
if [[ "${VAR_RECIPE_TABLE,,}" == "gpt" ]]; then
# shellcheck disable=SC2249
case "${var_mount_path,,}" in
"/")
@@ -254,6 +261,7 @@ partitioning() {
esac
# shellcheck disable=SC2249
case "${var_encryption,,}" in
true)
@@ -285,6 +293,7 @@ partitioning() {
### Set the bootable flag if necessary.
if [[ "${var_boot,,}" == "true" ]]; then
# shellcheck disable=SC2249
case "${VAR_RECIPE_TABLE,,}:${VAR_RECIPE_FIRMWARE,,}" in
gpt:uefi|mbr:uefi)

View File

@@ -55,4 +55,7 @@ benchmarking_encryption() {
guard_dir && return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f benchmarking_encryption
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -113,7 +113,7 @@ readonly -f mount_with_dir
# Outputs '/dev/mapper/<encryption_label>'
# Outputs '/dev/<dev><partition>'
# Globals:
# none
# None
# Arguments:
# 1: Device
# 2: Partition
@@ -144,7 +144,7 @@ readonly -f resolve_device
#######################################
# Validates btrfs compression algo and level.
# Globals:
# none
# None
# Arguments:
# 1: var_fs_btrfs_compress
# 2: var_fs_btrfs_level

View File

@@ -64,6 +64,7 @@ get_label() {
file)
# shellcheck disable=SC2249
case "${var_path}:${var_file}" in
swap:*) var_return_label="host_swap" ;;