V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 54s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 54s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -58,7 +58,7 @@ partitioning() {
|
||||
# shellcheck disable=SC2034
|
||||
declare -ag ARY_FORMT_MOUNT_PATHS=() # Used in: 3240() - Only entries [/paths] for filesystem generation.
|
||||
# shellcheck disable=SC2034
|
||||
declare -ag ARY_FSTAB_MOUNT_PATHS=() # Used in: 4200() - Only entries [/paths] for '/etc/fstab' generation.
|
||||
declare -ag ARY_FSTAB_MOUNT_PATHS=() # Used in: 4200() - Only entries [/paths] for the '/etc/fstab' generation.
|
||||
# shellcheck disable=SC2034
|
||||
declare -ag ARY_PATHS_SORTED=() # Used in: 3280() - All entries [/paths] in a mount ordering scheme.
|
||||
# Used in: 4200() - All entries [/paths] in a mount ordering scheme.
|
||||
@@ -69,7 +69,7 @@ partitioning() {
|
||||
|
||||
declare -a ary_devs=() ary_parts=() ary_paths_unsorted=()
|
||||
|
||||
declare -i i=0 var_dev_size=0 var_dev_end=0 var_multi_boot=0 var_multi_esp=0
|
||||
declare -i i=0 var_dev_size=0 var_dev_end=0 var_sec_size=512
|
||||
|
||||
### Iterate over all devices in the recipe.
|
||||
# shellcheck disable=SC2312
|
||||
@@ -141,7 +141,7 @@ partitioning() {
|
||||
var_mount_true=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.mount.enable" "${VAR_SETUP_PART}")
|
||||
var_encryption=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.encryption.enable" "${VAR_SETUP_PART}")
|
||||
|
||||
### Assign the start zone of the first partition and skip the first 2 MiB as best practice.
|
||||
### Assign the start zone of the first partition and skip the first 2 MiB as the best practice.
|
||||
if [[ "${var_begin,,}" == "min" ]]; then
|
||||
var_begin="2MiB"
|
||||
fi
|
||||
@@ -150,8 +150,9 @@ partitioning() {
|
||||
### There is no mandatory upper limit, but for particularly critical systems (FDE, RAID-6 setups, dm-integrity, etc.),
|
||||
### more generous reserves between 32 and 64 MiB are recommended.
|
||||
if [[ "${var_end,,}" == "max" ]]; then
|
||||
var_sec_size=$(blockdev --getpbsz "/dev/${var_dev}")
|
||||
var_dev_size=$(blockdev --getsize64 "/dev/${var_dev}")
|
||||
var_dev_end=$(( var_dev_size - 64 * 1024 * 1024 ))
|
||||
var_dev_end=$(( var_dev_size - (64 * 1024 * 1024) ))
|
||||
var_end_mib=$(( var_dev_end / 1024 / 1024 ))
|
||||
var_end_arg="${var_end_mib}MiB"
|
||||
else
|
||||
@@ -187,7 +188,7 @@ partitioning() {
|
||||
|
||||
do_log "info" "file_only" "3200() Partition: '/dev/${var_dev}${var_part}' generated | begin: '${var_begin}' | end: '${var_end_arg}'."
|
||||
|
||||
### Assign the correct GPT typecode via sgdisk if table is GPT.
|
||||
### Assign the correct GPT typecode via sgdisk if the table is GPT.
|
||||
if [[ "${VAR_RECIPE_TABLE,,}" == "gpt" ]]; then
|
||||
declare typecode="8300" # Default: Linux FS
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ validate_btrfs_compression() {
|
||||
mount_partition() {
|
||||
### Declare Arrays, HashMaps, and Variables.
|
||||
# shellcheck disable=SC2034
|
||||
declare -Ag HMP_FSTAB_MOUNT_OPTS # Used in: 4040() - [Mount Path:Mount Options].
|
||||
declare -Ag HMP_FSTAB_MOUNT_OPTS # Used in: 4200() - [Mount Path:Mount Options].
|
||||
|
||||
declare var_mount_path="" var_dev_part="" var_dev="" var_btrfs_options="" \
|
||||
var_encryption_label="" var_fs_btrfs_compress="" var_fs_btrfs_level="" var_fs_btrfs_snapshot="" \
|
||||
@@ -354,8 +354,12 @@ mount_partition() {
|
||||
|
||||
var_dev="${var_dev_part%.*}"
|
||||
lsblk -o NAME,MAJ:MIN,FSTYPE,FSVER,SIZE,UUID,MOUNTPOINT,PATH "/dev/${var_dev}" >| "${DIR_LOG}/${var_dev}_overview_3280.log"
|
||||
printf "%b" "${NL}" >> "${DIR_LOG}/${var_dev}_overview_3280.log"
|
||||
lsblk "/dev/${var_dev}" >> "${DIR_LOG}/${var_dev}_overview_3280.log"
|
||||
{
|
||||
printf "%b" "${NL}"
|
||||
lsblk "/dev/${var_dev}"
|
||||
printf "%b" "${NL}"
|
||||
lsblk -t "/dev/${var_dev}"
|
||||
} >> "${DIR_LOG}/${var_dev}_overview_3280.log"
|
||||
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user