V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m30s
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:
@@ -119,6 +119,8 @@ source_guard "./var/early.var.sh"
|
||||
source_guard "./lib/cdi_0010_basic/0010_color_echo.sh"
|
||||
|
||||
### 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 ..."
|
||||
declare -grx VAR_SETUP="true"
|
||||
umask 0022
|
||||
|
||||
@@ -134,6 +134,7 @@ END { print max }
|
||||
### Extract architecture.
|
||||
# shellcheck disable=SC2034
|
||||
VAR_ARCHITECTURE="${architecture,,}"
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
VAR_CODENAME="${distribution,,}"
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ update_grub() {
|
||||
if [[ "${grub_latest,,}" == "true" ]]; then
|
||||
|
||||
### 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
|
||||
|
||||
@@ -101,7 +101,7 @@ update_grub() {
|
||||
else
|
||||
|
||||
### Install the GRUB2 stable version.
|
||||
if [[ "${VAR_RECIPE_FIRMWARE}" == "uefi" ]]; then
|
||||
if [[ "${VAR_RECIPE_FIRMWARE,,}" == "uefi" ]]; then
|
||||
|
||||
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 ;;
|
||||
@@ -164,6 +164,8 @@ EOF
|
||||
### Change the GRUB OS detection configuration accordingly.
|
||||
if [[ "${grub_prober,,}" == "true" ]]; then
|
||||
|
||||
do_in_target "${TARGET}" apt-get install -y --no-install-recommends os-prober
|
||||
|
||||
cat << EOF >> "${TARGET}/etc/default/grub"
|
||||
# If your computer has multiple operating systems installed, then you
|
||||
# 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 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.
|
||||
var_uefi_mod+="cryptodisk gcry_rijndael gcry_sha256 gcry_sha512 gcry_whirlpool gcry_serpent gcry_twofish luks luks2 "
|
||||
### Filesystem modules.
|
||||
|
||||
26
lib/cdi_0005_guard/0008_guard_variable.sh
Normal file
26
lib/cdi_0005_guard/0008_guard_variable.sh
Normal 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
|
||||
@@ -16,6 +16,7 @@ guard_sourcing
|
||||
# Clean Up Wrapper on Trap on 'EXIT'.
|
||||
# Globals:
|
||||
# LOG_ERR
|
||||
# VAR_DIALOG
|
||||
# VAR_KERNEL_INF
|
||||
# VAR_KERNEL_SRT
|
||||
# VAR_KERNEL_TMP
|
||||
@@ -31,6 +32,7 @@ clean_up() {
|
||||
rm -f -- "${VAR_KERNEL_INF}"
|
||||
rm -f -- "${VAR_KERNEL_SRT}"
|
||||
rm -f -- "${VAR_KERNEL_TMP}"
|
||||
rm -f -- "${VAR_DIALOG}"
|
||||
rm -f -- "${VAR_NOTES}"
|
||||
|
||||
if [[ "${VAR_CHROOT_ACTIVATED}" == "system" ]]; then
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
# SPDX-Security-Contact: security@coresecret.eu
|
||||
|
||||
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/0012_calculate_runtime.sh"
|
||||
|
||||
@@ -14,8 +14,6 @@ guard_sourcing
|
||||
|
||||
### Definition of MUST set global variables.
|
||||
|
||||
# shellcheck disable=SC2155
|
||||
declare -grx VAR_DIALOG=$(mktemp var_dialog.XXXXXXXX)
|
||||
# shellcheck disable=SC2155
|
||||
declare -grx VAR_KERNEL_INF=$(mktemp var_kernel_inf.XXXXXXXX)
|
||||
# shellcheck disable=SC2155
|
||||
|
||||
Reference in New Issue
Block a user