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

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-08-06 09:01:16 +02:00
parent e108819ba0
commit 5717ad6570
7 changed files with 41 additions and 4 deletions

View File

@@ -119,6 +119,8 @@ source_guard "./var/early.var.sh"
source_guard "./lib/cdi_0010_basic/0010_color_echo.sh" source_guard "./lib/cdi_0010_basic/0010_color_echo.sh"
### ALL CHECKS DONE. READY TO START THE SCRIPT. ### ALL CHECKS DONE. READY TO START THE SCRIPT.
# shellcheck disable=SC2155
declare -grx VAR_DIALOG=$(mktemp var_dialog.XXXXXXXX)
color_echo "${GRE}" "CISS.DEBIAN.INSTALLER PREPARATION: ALL CHECKS DONE. READY TO START THE SCRIPT ..." color_echo "${GRE}" "CISS.DEBIAN.INSTALLER PREPARATION: ALL CHECKS DONE. READY TO START THE SCRIPT ..."
declare -grx VAR_SETUP="true" declare -grx VAR_SETUP="true"
umask 0022 umask 0022

View File

@@ -134,6 +134,7 @@ END { print max }
### Extract architecture. ### Extract architecture.
# shellcheck disable=SC2034 # shellcheck disable=SC2034
VAR_ARCHITECTURE="${architecture,,}" VAR_ARCHITECTURE="${architecture,,}"
# shellcheck disable=SC2034 # shellcheck disable=SC2034
VAR_CODENAME="${distribution,,}" VAR_CODENAME="${distribution,,}"

View File

@@ -58,7 +58,7 @@ update_grub() {
if [[ "${grub_latest,,}" == "true" ]]; then if [[ "${grub_latest,,}" == "true" ]]; then
### Install the GRUB2 backported version from the Bookworm backports repository. ### Install the GRUB2 backported version from the Bookworm backports repository.
if [[ "${VAR_RECIPE_FIRMWARE}" == "uefi" ]]; then if [[ "${VAR_RECIPE_FIRMWARE,,}" == "uefi" ]]; then
case "${VAR_ARCHITECTURE,,}" in case "${VAR_ARCHITECTURE,,}" in
@@ -101,7 +101,7 @@ update_grub() {
else else
### Install the GRUB2 stable version. ### Install the GRUB2 stable version.
if [[ "${VAR_RECIPE_FIRMWARE}" == "uefi" ]]; then if [[ "${VAR_RECIPE_FIRMWARE,,}" == "uefi" ]]; then
case "${VAR_ARCHITECTURE,,}" in case "${VAR_ARCHITECTURE,,}" in
amd64) do_in_target "${TARGET}" apt-get install -y --no-install-recommends grub2 grub2-common grub-efi-amd64 grub-efi-amd64-bin ;; amd64) do_in_target "${TARGET}" apt-get install -y --no-install-recommends grub2 grub2-common grub-efi-amd64 grub-efi-amd64-bin ;;
@@ -164,6 +164,8 @@ EOF
### Change the GRUB OS detection configuration accordingly. ### Change the GRUB OS detection configuration accordingly.
if [[ "${grub_prober,,}" == "true" ]]; then if [[ "${grub_prober,,}" == "true" ]]; then
do_in_target "${TARGET}" apt-get install -y --no-install-recommends os-prober
cat << EOF >> "${TARGET}/etc/default/grub" cat << EOF >> "${TARGET}/etc/default/grub"
# If your computer has multiple operating systems installed, then you # If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host # probably want to run os-prober. However, if your computer is a host
@@ -266,6 +268,11 @@ install_grub_uefi() {
declare -a ary_uefi_arg=() declare -a ary_uefi_arg=()
declare var_uefi_mod="" declare var_uefi_mod=""
if ! [[ -x "${TARGET}/usr/lib/grub/x86_64-efi/modinfo.sh" ]]; then
do_log "emergency" "file_only" "4230() Missing: [${TARGET}/usr/lib/grub/x86_64-efi/modinfo.sh]."
return "${ERR_GRUB_INSTALL}"
fi
### Cryptographic modules. ### Cryptographic modules.
var_uefi_mod+="cryptodisk gcry_rijndael gcry_sha256 gcry_sha512 gcry_whirlpool gcry_serpent gcry_twofish luks luks2 " var_uefi_mod+="cryptodisk gcry_rijndael gcry_sha256 gcry_sha512 gcry_whirlpool gcry_serpent gcry_twofish luks luks2 "
### Filesystem modules. ### Filesystem modules.

View File

@@ -0,0 +1,26 @@
#!/bin/bash
# SPDX-Version: 3.0
# SPDX-CreationInfo: 2025-06-17; WEIDNER, Marc S.; <msw@coresecret.dev>
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.installer.git
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: EUPL-1.2 OR LicenseRef-CCLA-1.0
# SPDX-LicenseComment: This file is part of the CISS.debian.installer.secure framework.
# SPDX-PackageName: CISS.debian.installer
# SPDX-Security-Contact: security@coresecret.eu
guard_sourcing
#######################################
# Ensures the value of the provided VAR is always lowercase.
# Use: ensure_lowercase VAR
# Arguments:
# 1: VARIABLE name only
#######################################
ensure_lowercase() {
declare -r name="${1}"
declare -n ref="${name}"
ref="${ref,,}"
}
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -16,6 +16,7 @@ guard_sourcing
# Clean Up Wrapper on Trap on 'EXIT'. # Clean Up Wrapper on Trap on 'EXIT'.
# Globals: # Globals:
# LOG_ERR # LOG_ERR
# VAR_DIALOG
# VAR_KERNEL_INF # VAR_KERNEL_INF
# VAR_KERNEL_SRT # VAR_KERNEL_SRT
# VAR_KERNEL_TMP # VAR_KERNEL_TMP
@@ -31,6 +32,7 @@ clean_up() {
rm -f -- "${VAR_KERNEL_INF}" rm -f -- "${VAR_KERNEL_INF}"
rm -f -- "${VAR_KERNEL_SRT}" rm -f -- "${VAR_KERNEL_SRT}"
rm -f -- "${VAR_KERNEL_TMP}" rm -f -- "${VAR_KERNEL_TMP}"
rm -f -- "${VAR_DIALOG}"
rm -f -- "${VAR_NOTES}" rm -f -- "${VAR_NOTES}"
if [[ "${VAR_CHROOT_ACTIVATED}" == "system" ]]; then if [[ "${VAR_CHROOT_ACTIVATED}" == "system" ]]; then

View File

@@ -11,6 +11,7 @@
# SPDX-Security-Contact: security@coresecret.eu # SPDX-Security-Contact: security@coresecret.eu
source_guard "./lib/cdi_0005_guard/0007_guard_safe_exec.sh" source_guard "./lib/cdi_0005_guard/0007_guard_safe_exec.sh"
source_guard "./lib/cdi_0005_guard/0008_guard_variable.sh"
source_guard "./lib/cdi_0010_basic/0011_gen_dir_files.sh" source_guard "./lib/cdi_0010_basic/0011_gen_dir_files.sh"
source_guard "./lib/cdi_0010_basic/0012_calculate_runtime.sh" source_guard "./lib/cdi_0010_basic/0012_calculate_runtime.sh"

View File

@@ -14,8 +14,6 @@ guard_sourcing
### Definition of MUST set global variables. ### Definition of MUST set global variables.
# shellcheck disable=SC2155
declare -grx VAR_DIALOG=$(mktemp var_dialog.XXXXXXXX)
# shellcheck disable=SC2155 # shellcheck disable=SC2155
declare -grx VAR_KERNEL_INF=$(mktemp var_kernel_inf.XXXXXXXX) declare -grx VAR_KERNEL_INF=$(mktemp var_kernel_inf.XXXXXXXX)
# shellcheck disable=SC2155 # shellcheck disable=SC2155