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

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-10-13 18:58:51 +01:00
parent e5262782e9
commit a8142abc9c
23 changed files with 406 additions and 178 deletions

View File

@@ -39,7 +39,11 @@ update_sources() {
### Update generated sources.
# shellcheck disable=SC2312
chroot_script "${var_target}" "apt-get update 2>&1 | tee -a ${var_logfile}; echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}"
chroot_script "${var_target}" "
apt-get update 2>&1 | tee -a ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
do_log "info" "file_only" "4110() Sources lists: updated successfully."
@@ -49,7 +53,8 @@ update_sources() {
chroot_script "${var_target}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests unattended-upgrades 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
do_log "info" "file_only" "4110() The update policy was set at installation time to: '${apt_updates_policy}'."
@@ -58,7 +63,8 @@ update_sources() {
chroot_script "${var_target}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests unattended-upgrades 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
# shellcheck disable=SC2016

View File

@@ -34,11 +34,12 @@ installation_kernel() {
if [[ -n "${VAR_KERNEL}" ]]; then
chroot_script "${TARGET}" '
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests '"${VAR_KERNEL}"' initramfs-tools 2>&1 | tee -a '"${var_logfile}"'
echo ExitCode: $? >> '"${var_logfile}"'
'
apt-get install -y --no-install-recommends --no-install-suggests ${VAR_KERNEL} initramfs-tools 2>&1 | tee -a ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
do_log "info" "file_only" "4120() Kernel image: '${VAR_KERNEL}' installed successfully."
@@ -49,7 +50,8 @@ installation_kernel() {
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests ${image} initramfs-tools 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
do_log "info" "file_only" "4120() Kernel image: '${image}' installed successfully."

View File

@@ -97,11 +97,15 @@ installation_toolset() {
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests ${ary_unique_pkgs[*]} 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
fi
guard_dir && return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f installation_toolset
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -36,7 +36,8 @@ installation_systemd() {
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests systemd systemd-sysv dbus 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
else
@@ -51,4 +52,7 @@ installation_systemd() {
guard_dir && return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f installation_systemd
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -57,7 +57,8 @@ installation_microcode() {
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests ${var_microcode_pkgs} 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
else
@@ -65,7 +66,8 @@ installation_microcode() {
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests --only-upgrade ${var_microcode_pkgs} 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
fi
@@ -78,4 +80,7 @@ installation_microcode() {
guard_dir && return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f installation_microcode
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -295,11 +295,15 @@ installation_firmware() {
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests ${ary_pkgs_resolved[*]} 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
guard_dir && return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f installation_firmware
#######################################
# Helper: Wildcardize a module alias (bus-aware, conservative)
@@ -352,4 +356,7 @@ wildcard_mod_alias() {
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f wildcard_mod_alias
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -50,7 +50,8 @@ installation_chrony() {
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests chrony 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
if [[ ! -e "${TARGET}/etc/systemd/system/multi-user.target.wants/chrony.service" ]]; then
@@ -71,7 +72,8 @@ installation_chrony() {
do_log "debug" "file_only" "4150() Executing: [chroot_script ${TARGET} chronyd -Q -f /etc/chrony/chrony.conf]."
chroot_script "${TARGET}" "
chronyd -Q -f /etc/chrony/chrony.conf 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
do_log "info" "file_only" "4150() Chrony NTPsec client installed."

View File

@@ -51,9 +51,13 @@ EOF
export INITRD=No
apt-get update
apt-get install -y --no-install-recommends --no-install-suggests eza 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
guard_dir && return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f installation_eza
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -51,9 +51,13 @@ EOF
export INITRD=No
apt-get update
apt-get install -y --no-install-recommends --no-install-suggests lynis 2>&1 | tee -a ${var_logfile}
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
guard_dir && return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f installation_lynis
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh