V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 43s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 43s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -23,7 +23,7 @@ guard_sourcing
|
|||||||
#######################################
|
#######################################
|
||||||
validation_array() {
|
validation_array() {
|
||||||
declare var_element
|
declare var_element
|
||||||
declare var_string=$1; shift
|
declare var_string="$1"; shift
|
||||||
for var_element in "$@"; do
|
for var_element in "$@"; do
|
||||||
if [[ "${var_element}" == "${var_string}" ]]; then
|
if [[ "${var_element}" == "${var_string}" ]]; then
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ yaml_parser() {
|
|||||||
|
|
||||||
yq -o=shell "${DIR_TMP}/combined.yaml" >| "${VAR_PRESEED}"
|
yq -o=shell "${DIR_TMP}/combined.yaml" >| "${VAR_PRESEED}"
|
||||||
|
|
||||||
### Generate Arrays for Grub Parameter, NTPSec Server FQDN, Software Packages
|
### Generate Arrays for [Grub Parameter], [NTPSec Server FQDN], [Software Packages].
|
||||||
while IFS='=' read -r var_key var_value; do
|
while IFS='=' read -r var_key var_value; do
|
||||||
var_value=${var_value#\'}
|
var_value=${var_value#\'}
|
||||||
var_value=${var_value%\'}
|
var_value=${var_value%\'}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ yaml_reader() {
|
|||||||
declare -gx VAR_RECIPE_STRING="" VAR_RECIPE_HIGHEST_DEVICE="" VAR_ARCHITECTURE="" VAR_RECIPE_FIRMWARE="" VAR_NUKE="" \
|
declare -gx VAR_RECIPE_STRING="" VAR_RECIPE_HIGHEST_DEVICE="" VAR_ARCHITECTURE="" VAR_RECIPE_FIRMWARE="" VAR_NUKE="" \
|
||||||
VAR_RECIPE_TABLE=""
|
VAR_RECIPE_TABLE=""
|
||||||
|
|
||||||
### Declare and substitute input files
|
### Declare and substitute input files.
|
||||||
declare -r var_if="${VAR_PRESEED}"
|
declare -r var_if="${VAR_PRESEED}"
|
||||||
### Search pattern for variables (recipe_<string>_active='true')
|
### Search pattern for variables (recipe_<string>_active='true')
|
||||||
declare -r var_search_pattern="^recipe_.*_active='true'"
|
declare -r var_search_pattern="^recipe_.*_active='true'"
|
||||||
@@ -67,65 +67,6 @@ yaml_reader() {
|
|||||||
exit "${ERR_NO_VALID_RECIPE}"
|
exit "${ERR_NO_VALID_RECIPE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Search "${var_if}" for matching recipe_${VAR_RECIPE_STRING}_dev_* entries and find the highest dev letter.
|
|
||||||
# shellcheck disable=SC2312
|
|
||||||
var_highest_dev=$(grep -E "^recipe_${VAR_RECIPE_STRING}_dev_" "${var_if}" | awk -F'_' '
|
|
||||||
{
|
|
||||||
if (NF >= 4) {
|
|
||||||
### Extract 4th position (e.g., "recipe_${VAR_RECIPE_STRING}_dev_sda" or "recipe_${VAR_RECIPE_STRING}_dev_vda")
|
|
||||||
device_field = $4
|
|
||||||
### Check, if field is at least 3 char wide and last char contains a letter
|
|
||||||
if (length(device_field) >= 3) {
|
|
||||||
last_char = substr(device_field, length(device_field), 1) ### Extract last letter of respective field
|
|
||||||
if (last_char ~ /^[a-z]$/ && last_char > max) {
|
|
||||||
max = last_char
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
END { print max }
|
|
||||||
')
|
|
||||||
|
|
||||||
### Save the result in VAR_RECIPE_HIGHEST_DEVICE.
|
|
||||||
VAR_RECIPE_HIGHEST_DEVICE="${var_highest_dev}"
|
|
||||||
|
|
||||||
if [[ -n "${VAR_RECIPE_HIGHEST_DEVICE}" ]]; then
|
|
||||||
do_log "info" "file_only" "1251() Found highest recipe device: '${VAR_RECIPE_HIGHEST_DEVICE}'."
|
|
||||||
else
|
|
||||||
do_log "fatal" "file_only" "1251() Found NO highest recipe device: '${VAR_RECIPE_HIGHEST_DEVICE}'."
|
|
||||||
exit "${ERR_NO_VALID_RECIPE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
### Read var_if and iterate through all matching entries without executing in a subshell
|
|
||||||
# shellcheck disable=SC2312
|
|
||||||
while read -r var_line; do
|
|
||||||
### Extract fields of line
|
|
||||||
IFS='_' read -ra var_fields <<< "${var_line}"
|
|
||||||
|
|
||||||
### Check that enough fields are available
|
|
||||||
if [[ "${#var_fields[@]}" -ge 5 ]]; then
|
|
||||||
var_device="${var_fields[3]}" ### The fourth position includes the device (e.g., sda, vda, xvda)
|
|
||||||
var_partition="${var_fields[4]}" ### The fifth position includes the partition (e.g., 13)
|
|
||||||
|
|
||||||
### Check, if the partition is a number and higher than the current value
|
|
||||||
if [[ "${var_partition}" =~ ^[0-9]+$ ]]; then
|
|
||||||
declare -i cur="${HMP_RECIPE_DEV_PARTITIONS[${var_device}]:-0}"
|
|
||||||
if (( var_partition > cur )); then
|
|
||||||
|
|
||||||
#if [[ -z "${HMP_RECIPE_DEV_PARTITIONS[${var_device}]:-}" || "${var_partition}" -gt ${HMP_RECIPE_DEV_PARTITIONS[${var_device}]:-0} ]]; then
|
|
||||||
# shellcheck disable=SC2004
|
|
||||||
HMP_RECIPE_DEV_PARTITIONS[${var_device}]="${var_partition}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
done < <(grep -E "^recipe_${VAR_RECIPE_STRING}_dev_" "${var_if}")
|
|
||||||
|
|
||||||
for var_device in "${!HMP_RECIPE_DEV_PARTITIONS[@]}"; do
|
|
||||||
do_log "info" "file_only" "1251() Highest number of partitions: [${var_device}:${HMP_RECIPE_DEV_PARTITIONS[${var_device}]}]."
|
|
||||||
done
|
|
||||||
|
|
||||||
### Extract architecture.
|
### Extract architecture.
|
||||||
VAR_ARCHITECTURE="${architecture}"
|
VAR_ARCHITECTURE="${architecture}"
|
||||||
|
|
||||||
|
|||||||
@@ -241,6 +241,9 @@ partitioning() {
|
|||||||
do_log "debug" "file_only" "3200() Stored in HashMap [HMP_PATH_PARTUUID] : '${var_mount_path}' -> '${HMP_PATH_PARTUUID["${var_mount_path}"]}'."
|
do_log "debug" "file_only" "3200() Stored in HashMap [HMP_PATH_PARTUUID] : '${var_mount_path}' -> '${HMP_PATH_PARTUUID["${var_mount_path}"]}'."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
### Gathering information for forthcoming modules 32n0().
|
||||||
|
HMP_PATH_DEV_PART["${var_mount_path}"]="${var_dev}.${var_part}"
|
||||||
|
|
||||||
### Gathering information for encryption module 3220().
|
### Gathering information for encryption module 3220().
|
||||||
if [[ "${var_encryption}" == "true" ]]; then
|
if [[ "${var_encryption}" == "true" ]]; then
|
||||||
ARY_CRYPT_MOUNT_PATHS+=("${var_mount_path}")
|
ARY_CRYPT_MOUNT_PATHS+=("${var_mount_path}")
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ partition_encryption() {
|
|||||||
for var_encryption_path in "${ARY_CRYPT_MOUNT_PATHS[@]}"; do
|
for var_encryption_path in "${ARY_CRYPT_MOUNT_PATHS[@]}"; do
|
||||||
|
|
||||||
### Generates physical device location.
|
### Generates physical device location.
|
||||||
var_dev_part="${HMP_PATH_DEV_PART[${var_encryption_path}]}"
|
var_dev_part="${HMP_PATH_DEV_PART["${var_encryption_path}"]}"
|
||||||
|
|
||||||
### Extract parameters from YAML.
|
### Extract parameters from YAML.
|
||||||
var_encryption_ephemeral=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev_part}.encryption.ephemeral" "${VAR_SETUP_PART}")
|
var_encryption_ephemeral=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev_part}.encryption.ephemeral" "${VAR_SETUP_PART}")
|
||||||
@@ -108,6 +108,7 @@ partition_encryption() {
|
|||||||
|
|
||||||
if [[ "${var_encryption_ephemeral,,}" == "true" ]]; then
|
if [[ "${var_encryption_ephemeral,,}" == "true" ]]; then
|
||||||
|
|
||||||
|
### Preparation of Ephemeral 'SWAP' and '/tmp' as per https://wiki.archlinux.org/title/Dm-crypt/Swap_encryption#UUID_and_LABEL
|
||||||
case "${var_encryption_path,,}" in
|
case "${var_encryption_path,,}" in
|
||||||
|
|
||||||
swap|/tmp)
|
swap|/tmp)
|
||||||
|
|||||||
@@ -13,10 +13,13 @@
|
|||||||
guard_sourcing
|
guard_sourcing
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# Function to format the respective partition on each device according to the recipe string chosen.
|
# Function to format the respective partition on each entry of 'ARY_FORMT_MOUNT_PATHS'.
|
||||||
# Globals:
|
# Globals:
|
||||||
|
# ARY_FORMT_MOUNT_PATHS
|
||||||
# DIR_LOG
|
# DIR_LOG
|
||||||
|
# HMP_PATH_DEV_PART
|
||||||
# HMP_PATH_FSUUID
|
# HMP_PATH_FSUUID
|
||||||
|
# NL
|
||||||
# VAR_RECIPE_STRING
|
# VAR_RECIPE_STRING
|
||||||
# VAR_SETUP_PART
|
# VAR_SETUP_PART
|
||||||
# Arguments:
|
# Arguments:
|
||||||
@@ -28,110 +31,103 @@ partition_formatting() {
|
|||||||
### Declare Arrays, HashMaps, and Variables.
|
### Declare Arrays, HashMaps, and Variables.
|
||||||
declare -Ag HMP_PATH_FSUUID # Used in: 3290() - [Mount Path:Filesystem UUID].
|
declare -Ag HMP_PATH_FSUUID # Used in: 3290() - [Mount Path:Filesystem UUID].
|
||||||
# Used in: 4060() - [Mount Path:Filesystem UUID].
|
# Used in: 4060() - [Mount Path:Filesystem UUID].
|
||||||
declare var_dev="" var_part="" \
|
declare var_dev="" var_dev_part="" \
|
||||||
var_encryption_enable="" var_encryption_label="" var_fs_btrfs_checksum="" var_fs_btrfs_compress="" var_fs_btrfs_mdup="" \
|
var_encryption_enable="" var_encryption_label="" var_format_path="" var_fs_btrfs_checksum="" var_fs_btrfs_compress="" \
|
||||||
var_fs_format="" var_fs_label="" var_fs_options="" var_fs_version="" var_mount_path="" var_node="" var_fs_uuid=""
|
var_fs_btrfs_mdup="" var_fs_label="" var_fs_options="" var_fs_version="" var_node="" var_fs_uuid=""
|
||||||
|
|
||||||
declare -a ary_devs=() ary_parts=() ary_opts=() ary_fmt_opts=()
|
declare -a ary_opts=() ary_fmt_opts=()
|
||||||
|
|
||||||
for var_format_path in "${ARY_FORMT_MOUNT_PATHS[@]}"; do
|
for var_format_path in "${ARY_FORMT_MOUNT_PATHS[@]}"; do
|
||||||
|
|
||||||
### Generates physical device location.
|
### Generates physical device location.
|
||||||
var_dev_part="${HMP_PATH_DEV_PART[${var_format_path}]}"
|
var_dev_part="${HMP_PATH_DEV_PART["${var_format_path}"]}"
|
||||||
|
|
||||||
### Extract parameters from YAML.
|
### Extract parameters from YAML.
|
||||||
|
var_encryption_enable=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev_part}.encryption.enable" "${VAR_SETUP_PART}")
|
||||||
|
var_fs_btrfs_checksum=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev_part}.filesystem.btrfs.checksum" "${VAR_SETUP_PART}")
|
||||||
|
var_fs_btrfs_compress=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev_part}.filesystem.btrfs.compress" "${VAR_SETUP_PART}")
|
||||||
|
var_fs_btrfs_mdup=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev_part}.filesystem.btrfs.mdup" "${VAR_SETUP_PART}")
|
||||||
|
var_fs_options=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev_part}.filesystem.options" "${VAR_SETUP_PART}")
|
||||||
|
var_fs_version=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev_part}.filesystem.version" "${VAR_SETUP_PART}")
|
||||||
|
|
||||||
### Extract parameters from YAML.
|
case "${var_format_path,,}" in
|
||||||
var_encryption_enable=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.encryption.enable" "${VAR_SETUP_PART}")
|
swap|/tmp)
|
||||||
var_fs_btrfs_checksum=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.filesystem.btrfs.checksum" "${VAR_SETUP_PART}")
|
do_log "info" "file_only" "3240() Partition: '/dev/${var_dev_part}' ephemeral encryption already prepared in 3220(): '${var_format_path}'."
|
||||||
var_fs_btrfs_compress=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.filesystem.btrfs.compress" "${VAR_SETUP_PART}")
|
### Nothing more to do here.
|
||||||
var_fs_btrfs_mdup=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.filesystem.btrfs.mdup" "${VAR_SETUP_PART}")
|
continue
|
||||||
var_fs_format=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.filesystem.format" "${VAR_SETUP_PART}")
|
;;
|
||||||
var_fs_options=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.filesystem.options" "${VAR_SETUP_PART}")
|
esac
|
||||||
var_fs_version=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.filesystem.version" "${VAR_SETUP_PART}")
|
|
||||||
var_mount_path=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.mount.path" "${VAR_SETUP_PART}")
|
|
||||||
|
|
||||||
[[ "${var_fs_format,,}" != "true" ]] && continue
|
if [[ "${var_encryption_enable,,}" == "true" ]]; then
|
||||||
|
var_encryption_label=$(get_label "${var_format_path}" "${var_fs_version}" "luks")
|
||||||
|
var_node="/dev/mapper/${var_encryption_label}"
|
||||||
|
else
|
||||||
|
var_node="/dev/${var_dev_part}"
|
||||||
|
fi
|
||||||
|
|
||||||
### Preparation of Ephemeral 'SWAP' and '/tmp' as per https://wiki.archlinux.org/title/Dm-crypt/Swap_encryption#UUID_and_LABEL
|
var_fs_label=$(get_label "${var_format_path}" "${var_fs_version}" "file")
|
||||||
case "${var_mount_path,,}" in
|
|
||||||
swap|/tmp)
|
|
||||||
do_log "info" "file_only" "3240() Partition: '/dev/${var_dev}${var_part}' ephemeral encryption already prepared in 3220(): '${var_mount_path}'."
|
|
||||||
continue
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ "${var_encryption_enable,,}" == "true" ]]; then
|
case "${var_fs_version,,}" in
|
||||||
var_encryption_label=$(get_label "${var_mount_path}" "${var_fs_version}" "luks")
|
|
||||||
var_node="/dev/mapper/${var_encryption_label}"
|
|
||||||
else
|
|
||||||
var_node="/dev/${var_dev}${var_part}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
var_fs_label=$(get_label "${var_mount_path}" "${var_fs_version}" "file")
|
btrfs)
|
||||||
|
ary_opts=( -L "${var_fs_label}" -f --csum "${var_fs_btrfs_checksum}" )
|
||||||
|
[[ "${var_fs_btrfs_mdup,,}" == "true" ]] && ary_opts+=( -m dup )
|
||||||
|
|
||||||
case "${var_fs_version,,}" in
|
mkfs.btrfs "${ary_opts[@]}" "${var_node}"
|
||||||
|
|
||||||
btrfs)
|
do_log "debug" "file_only" "3240() [mkfs.btrfs ${ary_opts[*]} ${var_node}]."
|
||||||
ary_opts=( -L "${var_fs_label}" -f --csum "${var_fs_btrfs_checksum}" )
|
do_log "info" "file_only" "3240() Partition: '${var_node}' formatted: 'btrfs' options: '${ary_opts[*]}'."
|
||||||
[[ "${var_fs_btrfs_mdup,,}" == "true" ]] && ary_opts+=( -m dup )
|
|
||||||
|
|
||||||
mkfs.btrfs "${ary_opts[@]}" "${var_node}"
|
echo "Partition: '${var_node}':" >> "${DIR_LOG}/btrfs.log"
|
||||||
|
btrfs filesystem show "${var_node}" >> "${DIR_LOG}/btrfs.log"
|
||||||
|
|
||||||
do_log "debug" "file_only" "3240() [mkfs.btrfs ${ary_opts[*]} ${var_node}]."
|
var_fs_uuid=$(blkid -s UUID -o value "${var_node}")
|
||||||
do_log "info" "file_only" "3240() Partition: '${var_node}' formatted: 'btrfs' options: '${ary_opts[*]}'."
|
### Gathering information for '/etc/fstab'-generation in 4040().
|
||||||
|
HMP_PATH_FSUUID["${var_format_path}"]="${var_fs_uuid}"
|
||||||
|
;;
|
||||||
|
|
||||||
echo "Partition: '${var_node}':" >> "${DIR_LOG}/btrfs.log"
|
ext4)
|
||||||
btrfs filesystem show "${var_node}" >> "${DIR_LOG}/btrfs.log"
|
read -r -a ary_fmt_opts <<< "${var_fs_options}"
|
||||||
|
|
||||||
var_fs_uuid=$(blkid -s UUID -o value "${var_node}")
|
mkfs.ext4 -L "${var_fs_label}" "${ary_fmt_opts[@]}" "${var_node}"
|
||||||
### Gathering information for '/etc/fstab'-generation in 4040().
|
|
||||||
HMP_PATH_FSUUID["${var_mount_path}"]="${var_fs_uuid}"
|
|
||||||
;;
|
|
||||||
|
|
||||||
ext4)
|
do_log "debug" "file_only" "3240() [mkfs.ext4 -L ${var_fs_label} ${ary_fmt_opts[*]} ${var_node}]."
|
||||||
read -r -a ary_fmt_opts <<< "${var_fs_options}"
|
do_log "info" "file_only" "3240() Partition: '${var_node}' formatted: 'ext4' options: '${ary_fmt_opts[*]}'."
|
||||||
|
|
||||||
mkfs.ext4 -L "${var_fs_label}" "${ary_fmt_opts[@]}" "${var_node}"
|
echo "Partition: '${var_node}':" >> "${DIR_LOG}/ext4.log"
|
||||||
|
tune2fs -l "${var_node}" >> "${DIR_LOG}/ext4.log"
|
||||||
|
|
||||||
do_log "debug" "file_only" "3240() [mkfs.ext4 -L ${var_fs_label} ${ary_fmt_opts[*]} ${var_node}]."
|
var_fs_uuid=$(blkid -s UUID -o value "${var_node}")
|
||||||
do_log "info" "file_only" "3240() Partition: '${var_node}' formatted: 'ext4' options: '${ary_fmt_opts[*]}'."
|
### Gathering information for '/etc/fstab'-generation in 4040().
|
||||||
|
HMP_PATH_FSUUID["${var_format_path}"]="${var_fs_uuid}"
|
||||||
|
;;
|
||||||
|
|
||||||
echo "Partition: '${var_node}':" >> "${DIR_LOG}/ext4.log"
|
fat32)
|
||||||
tune2fs -l "${var_node}" >> "${DIR_LOG}/ext4.log"
|
mkfs.fat -F 32 -n "${var_fs_label}" "${var_node}"
|
||||||
|
|
||||||
var_fs_uuid=$(blkid -s UUID -o value "${var_node}")
|
do_log "debug" "file_only" "3240() [mkfs.fat -F 32 -n ${var_fs_label} ${var_node}]."
|
||||||
### Gathering information for '/etc/fstab'-generation in 4040().
|
do_log "info" "file_only" "3240() Partition: '${var_node}' formatted: 'FAT32'."
|
||||||
HMP_PATH_FSUUID["${var_mount_path}"]="${var_fs_uuid}"
|
|
||||||
;;
|
|
||||||
|
|
||||||
fat32)
|
var_fs_uuid=$(blkid -s UUID -o value "${var_node}")
|
||||||
mkfs.fat -F 32 -n "${var_fs_label}" "${var_node}"
|
### Gathering information for '/etc/fstab'-generation in 4040().
|
||||||
|
HMP_PATH_FSUUID["${var_format_path}"]="${var_fs_uuid}"
|
||||||
|
;;
|
||||||
|
|
||||||
do_log "debug" "file_only" "3240() [mkfs.fat -F 32 -n ${var_fs_label} ${var_node}]."
|
*)
|
||||||
do_log "info" "file_only" "3240() Partition: '${var_node}' formatted: 'FAT32'."
|
do_log "error" "file_only" "3240() Unsupported filesystem format: '${var_fs_version}'."
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
|
||||||
var_fs_uuid=$(blkid -s UUID -o value "${var_node}")
|
esac
|
||||||
### Gathering information for '/etc/fstab'-generation in 4040().
|
|
||||||
HMP_PATH_FSUUID["${var_mount_path}"]="${var_fs_uuid}"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
var_dev="${HMP_PATH_DEV_PART["${var_format_path}"]}"
|
||||||
do_log "error" "file_only" "3240() Unsupported filesystem format: '${var_fs_version}'."
|
var_dev="${var_dev%.*}"
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
lsblk -o NAME,MAJ:MIN,FSTYPE,FSVER,SIZE,UUID,MOUNTPOINT,PATH "/dev/${var_dev}" >| "${DIR_LOG}/${var_dev}_overview.log"
|
lsblk -o NAME,MAJ:MIN,FSTYPE,FSVER,SIZE,UUID,MOUNTPOINT,PATH "/dev/${var_dev}" >| "${DIR_LOG}/${var_dev}_overview.log"
|
||||||
printf "%b" "${NL}" >> "${DIR_LOG}/${var_dev}_overview.log"
|
printf "%b" "${NL}" >> "${DIR_LOG}/${var_dev}_overview.log"
|
||||||
lsblk "/dev/${var_dev}" >> "${DIR_LOG}/${var_dev}_overview.log"
|
lsblk "/dev/${var_dev}" >> "${DIR_LOG}/${var_dev}_overview.log"
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user