Compare commits

..

2 Commits

Author SHA256 Message Date
f37592c257 V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 56s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
2025-09-05 22:08:01 +02:00
92563b1cf9 V8.00.000.2025.06.17
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
2025-09-05 21:54:35 +02:00
5 changed files with 19 additions and 54 deletions

View File

@@ -352,8 +352,8 @@ partitioning() {
done done
lsblk -o NAME,START,SIZE,PHY-SEC,LOG-SEC,ALIGNMENT "/dev/${var_dev}" >| "${DIR_LOG}/${var_dev}_alignment.log" lsblk -o NAME,START,SIZE,PHY-SEC,LOG-SEC,ALIGNMENT "/dev/${var_dev}" >| "${DIR_LOG}/3200_${var_dev}_alignment.log"
sgdisk -p "/dev/${var_dev}" >| "${DIR_LOG}/${var_dev}_info.log" sgdisk -p "/dev/${var_dev}" >| "${DIR_LOG}/3200_${var_dev}_info.log"
done done
@@ -378,8 +378,8 @@ partitioning() {
sort -z -t $'\t' -k1,1 -k2,2 | cut -z -f2- sort -z -t $'\t' -k1,1 -k2,2 | cut -z -f2-
) )
printf "%s\n" "${ary_paths_unsorted[@]}" >| "${DIR_LOG}/mount_paths_unsorted.log" printf "%s\n" "${ary_paths_unsorted[@]}" >| "${DIR_LOG}/3200_mount_paths_unsorted.log"
printf "%s\n" "${ARY_PATHS_SORTED[@]}" >| "${DIR_LOG}/mount_paths_sorted.log" printf "%s\n" "${ARY_PATHS_SORTED[@]}" >| "${DIR_LOG}/3200_mount_paths_sorted.log"
guard_dir && return 0 guard_dir && return 0
} }

View File

@@ -188,7 +188,7 @@ partition_encryption() {
do_log "info" "file_only" "3220() Partition: '/dev/${var_dev}' opened as '/dev/mapper/${var_encryption_label}'." do_log "info" "file_only" "3220() Partition: '/dev/${var_dev}' opened as '/dev/mapper/${var_encryption_label}'."
### Create luksDump log entry. ### Create luksDump log entry.
cryptsetup luksDump "/dev/${var_dev}" >> "${DIR_LOG}/cryptsetup_luksdump_${var_dev}.log" cryptsetup luksDump "/dev/${var_dev}" >> "${DIR_LOG}/3220_cryptsetup_luksdump_${var_dev}.log"
### Store UUID of the LUKS container. ### Store UUID of the LUKS container.
var_uuid=$(blkid -s UUID -o value "/dev/${var_dev}") var_uuid=$(blkid -s UUID -o value "/dev/${var_dev}")

View File

@@ -85,8 +85,8 @@ partition_formatting() {
do_log "debug" "file_only" "3240() [mkfs.btrfs ${ary_opts[*]} ${var_node}]." do_log "debug" "file_only" "3240() [mkfs.btrfs ${ary_opts[*]} ${var_node}]."
do_log "info" "file_only" "3240() Partition: '${var_node}' formatted: 'btrfs' options: '${ary_opts[*]}'." do_log "info" "file_only" "3240() Partition: '${var_node}' formatted: 'btrfs' options: '${ary_opts[*]}'."
echo "Partition: '${var_node}':" >> "${DIR_LOG}/btrfs.log" echo "Partition: '${var_node}':" >> "${DIR_LOG}/3240_btrfs.log"
btrfs filesystem show "${var_node}" >> "${DIR_LOG}/btrfs.log" btrfs filesystem show "${var_node}" >> "${DIR_LOG}/3240_btrfs.log"
var_fs_uuid=$(blkid -s UUID -o value "${var_node}") var_fs_uuid=$(blkid -s UUID -o value "${var_node}")
### Gathering information for '/etc/fstab'-generation in 4040() and '/etc/crypttab'-generation in 4060(). ### Gathering information for '/etc/fstab'-generation in 4040() and '/etc/crypttab'-generation in 4060().
@@ -102,8 +102,8 @@ partition_formatting() {
do_log "debug" "file_only" "3240() [mkfs.ext4 -L ${var_fs_label} ${ary_fmt_opts[*]} ${var_node}]." do_log "debug" "file_only" "3240() [mkfs.ext4 -L ${var_fs_label} ${ary_fmt_opts[*]} ${var_node}]."
do_log "info" "file_only" "3240() Partition: '${var_node}' formatted: 'ext4' options: '${ary_fmt_opts[*]}'." do_log "info" "file_only" "3240() Partition: '${var_node}' formatted: 'ext4' options: '${ary_fmt_opts[*]}'."
echo "Partition: '${var_node}':" >> "${DIR_LOG}/ext4.log" echo "Partition: '${var_node}':" >> "${DIR_LOG}/3240_ext4.log"
tune2fs -l "${var_node}" >> "${DIR_LOG}/ext4.log" tune2fs -l "${var_node}" >> "${DIR_LOG}/3240_ext4.log"
var_fs_uuid=$(blkid -s UUID -o value "${var_node}") var_fs_uuid=$(blkid -s UUID -o value "${var_node}")
### Gathering information for '/etc/fstab'-generation in 4040() and '/etc/crypttab'-generation in 4060(). ### Gathering information for '/etc/fstab'-generation in 4040() and '/etc/crypttab'-generation in 4060().
@@ -131,9 +131,9 @@ partition_formatting() {
esac esac
var_dev="${var_dev_part%.*}" var_dev="${var_dev_part%.*}"
lsblk -o NAME,MAJ:MIN,FSTYPE,FSVER,SIZE,UUID,MOUNTPOINT,PATH "/dev/${var_dev}" >| "${DIR_LOG}/${var_dev}_overview_3240.log" lsblk -o NAME,MAJ:MIN,FSTYPE,FSVER,SIZE,UUID,MOUNTPOINT,PATH "/dev/${var_dev}" >| "${DIR_LOG}/3240_${var_dev}_overview.log"
printf "%b" "${NL}" >> "${DIR_LOG}/${var_dev}_overview_3240.log" printf "%b" "${NL}" >> "${DIR_LOG}/3240_${var_dev}_overview.log"
lsblk "/dev/${var_dev}" >> "${DIR_LOG}/${var_dev}_overview_3240.log" lsblk "/dev/${var_dev}" >> "${DIR_LOG}/3240_${var_dev}_overview.log"
done done

View File

@@ -353,14 +353,14 @@ mount_partition() {
esac esac
var_dev="${var_dev_part%.*}" 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" lsblk -o NAME,MAJ:MIN,FSTYPE,FSVER,SIZE,UUID,MOUNTPOINT,PATH "/dev/${var_dev}" >| "${DIR_LOG}/3280_${var_dev}_overview.log"
lsblk -o NAME,PARTTYPE,FSTYPE,FSVER,UUID,MOUNTPOINT,PATH "/dev/${var_dev}" >| "${DIR_LOG}/${var_dev}_parttype_3280.log" lsblk -o NAME,PARTTYPE,FSTYPE,FSVER,UUID,MOUNTPOINT,PATH "/dev/${var_dev}" >| "${DIR_LOG}/3280_${var_dev}_parttype.log"
{ {
printf "%b" "${NL}" printf "%b" "${NL}"
lsblk "/dev/${var_dev}" lsblk "/dev/${var_dev}"
printf "%b" "${NL}" printf "%b" "${NL}"
lsblk -t "/dev/${var_dev}" lsblk -t "/dev/${var_dev}"
} >> "${DIR_LOG}/${var_dev}_overview_3280.log" } >> "${DIR_LOG}/3280_${var_dev}_overview.log"
done done

View File

@@ -23,24 +23,8 @@ check_pkgs() {
### Declare Arrays, HashMaps, and Variables. ### Declare Arrays, HashMaps, and Variables.
# shellcheck disable=SC2154 # shellcheck disable=SC2154
declare -A hmp_tool_pkg=( declare -A hmp_tool_pkg=(
[apt-show-versions]="apt-show-versions"
[bc]="bc"
[dig]="bind9-dnsutils"
[host]="bind9-dnsutils"
[hexdump]="bsdmainutils"
[btrfs]="btrfs-progs" [btrfs]="btrfs-progs"
[bunzip2]="bzip2"
[setupcon]="console-setup"
[base64]="coreutils"
[cat]="coreutils"
[chmod]="coreutils"
[chown]="coreutils"
[cp]="coreutils"
[echo]="coreutils"
[ln]="coreutils"
[mkdir]="coreutils"
[curl]="curl" [curl]="curl"
[dirmngr]="dirmngr"
[dmsetup]="dmsetup" [dmsetup]="dmsetup"
[fsck.vfat]="dosfstools" [fsck.vfat]="dosfstools"
[mkfs.vfat]="dosfstools" [mkfs.vfat]="dosfstools"
@@ -53,40 +37,21 @@ check_pkgs() {
[file]="file" [file]="file"
[awk]="gawk" [awk]="gawk"
[gdisk]="gdisk" [gdisk]="gdisk"
[gnupg]="gnupg"
[grep]="grep" [grep]="grep"
[gzip]="gzip" [gzip]="gzip"
[haveged]="haveged"
[update-initramfs]="initramfs-tools"
[ip]="iproute2" [ip]="iproute2"
[ping]="iputils-ping" [ping]="iputils-ping"
[jq]="jq" [jq]="jq"
[loadkeys]="kbd"
[setfont]="kbd"
[keyctl]="keyutils"
[modprobe]="kmod"
[libpam-pwquality]="libpam-pwquality"
[logrotate]="logrotate"
[lsb_release]="lsb-release" [lsb_release]="lsb-release"
[parted]="parted" [parted]="parted"
[chpasswd]="passwd" [chpasswd]="passwd"
[chsh]="passwd" [chsh]="passwd"
[lspci]="pciutils"
[sysctl]="procps"
[pwgen]="pwgen" [pwgen]="pwgen"
[sed]="sed" [sed]="sed"
[sudo]="sudo"
[tar]="tar" [tar]="tar"
[tree]="tree" [tree]="tree"
[unzip]="unzip" [unzip]="unzip"
[lsusb]="usbutils"
[blkid]="util-linux" [blkid]="util-linux"
[dmesg]="util-linux"
[lsblk]="util-linux"
[findmnt]="util-linux"
[mount]="util-linux"
[umount]="util-linux"
[xxd]="vim-common"
[wget]="wget" [wget]="wget"
[whois]="whois" [whois]="whois"
[zsh]="zsh" [zsh]="zsh"
@@ -114,7 +79,7 @@ check_pkgs() {
# shellcheck disable=SC2312 # shellcheck disable=SC2312
mapfile -t ary_unique_pkgs < <(printf '%s\n' "${ary_missing_pkgs[@]}" | sort -u) mapfile -t ary_unique_pkgs < <(printf '%s\n' "${ary_missing_pkgs[@]}" | sort -u)
do_log "debug" "file_only" "0030() [ary_unique_pkgs]='${ary_unique_pkgs[*]}'." do_log "debug" "file_only" "0030() [ary_unique_pkgs]='${ary_unique_pkgs[*]}'."
apt-get install -y --no-install-recommends --no-install-suggests "${ary_unique_pkgs[*]}" 2>&1 apt-get install -y --no-install-recommends --no-install-suggests "${ary_unique_pkgs[*]}" >| "${DIR_LOG}/0030_check_pkgs.log"
fi fi
@@ -122,14 +87,14 @@ check_pkgs() {
if grep -RqsE '^[[:space:]]*deb .*backports' /etc/apt/sources.list /etc/apt/sources.list.d; then if grep -RqsE '^[[:space:]]*deb .*backports' /etc/apt/sources.list /etc/apt/sources.list.d; then
# shellcheck disable=SC2155 # shellcheck disable=SC2155
declare codename=$(lsb_release -sc) declare codename=$(lsb_release -sc)
apt-get install -y -t "${codename}-backports" debootstrap apt-get install -y -t "${codename}-backports" debootstrap >> "${DIR_LOG}/0030_check_pkgs.log"
else else
apt-get install -y debootstrap apt-get install -y debootstrap >> "${DIR_LOG}/0030_check_pkgs.log"
fi fi
fi fi
if [[ -z "$(command -v dialog || true)" ]]; then if [[ -z "$(command -v dialog || true)" ]]; then
if ! "${VAR_AUTO_INSTALL}"; then apt-get install -y --no-install-recommends dialog; fi if ! "${VAR_AUTO_INSTALL}"; then apt-get install -y --no-install-recommends dialog >> "${DIR_LOG}/0030_check_pkgs.log"; fi
fi fi
guard_dir && return 0 guard_dir && return 0