V8.00.000.2025.06.17
All checks were successful
🛡️ Retrieve DNSSEC status of coresecret.dev. / 🛡️ Retrieve DNSSEC status of coresecret.dev. (push) Successful in 34s
🔁 Render Graphviz Diagrams. / 🔁 Render Graphviz Diagrams. (push) Successful in 24s
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m35s
All checks were successful
🛡️ Retrieve DNSSEC status of coresecret.dev. / 🛡️ Retrieve DNSSEC status of coresecret.dev. (push) Successful in 34s
🔁 Render Graphviz Diagrams. / 🔁 Render Graphviz Diagrams. (push) Successful in 24s
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m35s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
108
var/global.var.sh
Normal file
108
var/global.var.sh
Normal file
@@ -0,0 +1,108 @@
|
||||
#!/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
|
||||
|
||||
### Definition of MUST set global Variables
|
||||
|
||||
# shellcheck disable=SC2155
|
||||
declare -grx VAR_KERNEL_INF="$(mktemp)"
|
||||
declare -grx VAR_KERNEL_TMP="$(mktemp)"
|
||||
declare -grx VAR_KERNEL_SRT="$(mktemp)"
|
||||
declare -grx VAR_NOTES="$(mktemp)"
|
||||
declare -grx LOG_ERROR="/tmp/ciss_debian_installer_$$_error.log"
|
||||
declare -grx VAR_SETUP_CONF="preseed.yaml"
|
||||
declare -grx VAR_SETUP_PART="partitioning.yaml"
|
||||
declare -grx VAR_SETUP_FILE="${0##*/}" # 'setup.sh'
|
||||
declare -grx VAR_SETUP_PATH="$(cd "$(dirname "${0}")" && pwd)" # '/opt/git/CISS.debian.installer'
|
||||
declare -grx VAR_SETUP_FULL="$(cd "$(dirname "${0}")" && pwd)/${0##*/}" # '/opt/git/CISS.debian.installer/setup.sh'
|
||||
|
||||
### Initialize variables of different directories
|
||||
declare -grx DIR_BAK="/tmp/.ciss/backup"
|
||||
declare -grx DIR_CNF="${VAR_SETUP_PATH}/.preseed"
|
||||
declare -grx DIR_INS="${VAR_SETUP_PATH}"
|
||||
declare -grx DIR_LOG="/tmp/.ciss/log"
|
||||
declare -grx DIR_TMP="/tmp/.ciss/tmp"
|
||||
|
||||
### Initialize variables for logging
|
||||
declare -grx LOG_ERR="${DIR_LOG}/ciss_debian_installer_$$_error.log"
|
||||
declare -grx LOG_INS="${DIR_LOG}/ciss_debian_installer_$$_install.log"
|
||||
declare -grx LOG_NIC="${DIR_LOG}/ciss_debian_installer_$$_nic.log"
|
||||
|
||||
### Initialize variable of imported and cleaned 'YAML' -> 'BASH-variable'-file.
|
||||
declare -grx VAR_PRESEED="${DIR_TMP}/combined.var"
|
||||
|
||||
### Base mount paths for debootstrap.
|
||||
declare -grx TARGET="/target"
|
||||
declare -grx RECOVERY="/recovery"
|
||||
|
||||
### Default log level.
|
||||
declare -gx DEFAULT_LOG_LEVEL="info"
|
||||
|
||||
### 2040_grub_helper.sh:
|
||||
### Variable to finish GRUB CMDLINE strings.
|
||||
declare -grx VAR_H='"'
|
||||
|
||||
### 2050_yaml_parser.sh:
|
||||
### Indexed Arrays for 'Debian Packages' to install and 'NTPSec Server' to use.
|
||||
declare -agx ARY_PACKAGES=()
|
||||
declare -agx ARY_NTPSRVR=()
|
||||
|
||||
### 2051_yaml_reader.sh:
|
||||
### Variable for highest device count e.g., /dev/sdf = "f"
|
||||
declare -gx VAR_RECIPE_DEV_COUNTER=""
|
||||
### Variable for firmware ("UEFI" || "BIOS")
|
||||
declare -gx VAR_RECIPE_FIRMWARE=""
|
||||
### Variable for active recipe (e.g., "gben0afx256")
|
||||
declare -gx VAR_RECIPE_STRING=""
|
||||
### Variable partition table ("gpt" || "mbr")
|
||||
declare -gx VAR_RECIPE_TABLE=""
|
||||
### Assoziative Array (HashMap) for devices and accompanying partitions
|
||||
declare -Agx HMP_RECIPE_DEV_PARTITIONS=()
|
||||
|
||||
### 3200_partitioning.sh:
|
||||
### Assoziative Array (HashMap) to store UUIDs for each partition
|
||||
### HMP_UUID_PARTITION["UUID_${DEV}${PARTITION}"]="${UUID}"
|
||||
declare -Ag HMP_UUID_PARTITION=()
|
||||
|
||||
|
||||
### TODO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3_5_1_functions_installation_partition_encryption()] Create a hashmap to store the device path for each ephemeral partition
|
||||
# MAP_EPHEMERAL_DEV["${MOUNT_PATH}"]="/dev/${DEV}${PARTITION}"
|
||||
declare -g -A MAP_EPHEMERAL_DEV=()
|
||||
|
||||
# [3_5_1_functions_installation_partition_encryption()] Create a hashmap to store the encryption label for each ephemeral partition
|
||||
# MAP_EPHEMERAL_ENCLABEL["${MOUNT_PATH}"]="${ENCRYPTION_LABEL}"
|
||||
declare -g -A MAP_EPHEMERAL_ENCLABEL=()
|
||||
|
||||
# [3_5_1_functions_installation_partition_encryption()] Create a hashmap to store UUIDs for each encrypted partition
|
||||
# MAP_UUID_CRYPT["${ENCRYPTION_LABEL}"]="${UUID}"
|
||||
declare -g -A MAP_UUID_CRYPT=()
|
||||
|
||||
# [3_5_1_functions_installation_partition_encryption()] Create a hashmap to store the device path for each encrypted partition
|
||||
# MAP_PATH_CRYPT["${MOUNT_PATH}"]="${ENCRYPTION_LABEL}"
|
||||
declare -g -A MAP_PATH_CRYPT=()
|
||||
|
||||
# [3_6_0_functions_installation_setup_filesystem()] Create a hashmap to store the mount paths of each partition
|
||||
declare -g -A MAP_MOUNTPATH_DEV=()
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
Reference in New Issue
Block a user