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:
21
var/bash.var.sh
Normal file
21
var/bash.var.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/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
|
||||
|
||||
### For all options see https://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin
|
||||
set -o errexit # Exit script when a command exits with non-zero status, the same as "set -e".
|
||||
set -o errtrace # Any traps on ERR are inherited in a subshell environment, the same as "set -E".
|
||||
set -o functrace # Any traps on DEBUG and RETURN are inherited in a subshell environment, the same as "set -T".
|
||||
set -o nounset # Exit script on use of an undefined variable, the same as "set -u".
|
||||
set -o pipefail # Makes pipelines return the exit status of the last command in the pipe that failed.
|
||||
set -o noclobber # Prevent overwriting, the same as "set -C".
|
||||
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
23
var/colors.var.sh
Normal file
23
var/colors.var.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/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
|
||||
|
||||
declare -grx C_BLA='\e[90m' # Beautiful black for the techno fans.
|
||||
declare -grx C_RED='\e[91m' # Bright red.
|
||||
declare -grx C_GRE='\e[92m' # Vibrant green.
|
||||
declare -grx C_YEL='\e[93m' # Fancy yellow
|
||||
declare -grx C_BLU='\e[94m' # Organic blue.
|
||||
declare -grx C_MAG='\e[95m' # Super gay magenta.
|
||||
declare -grx C_CYA='\e[96m' # Lovely cyan.
|
||||
declare -grx C_WHI='\e[97m' # Fantastic color mix.
|
||||
declare -grx C_RES='\e[0m' # Forget everything.
|
||||
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
28
var/early.var.sh
Normal file
28
var/early.var.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/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 early Variables
|
||||
|
||||
# shellcheck disable=SC2155
|
||||
declare -agx ARY_PARAM_ARRAY=("$@")
|
||||
declare -grx VAR_PARAM_COUNT="$#"
|
||||
declare -grx VAR_PARAM_STRNG="$*"
|
||||
declare -grx VAR_CONTACT="security@coresecret.eu"
|
||||
declare -grx VAR_VERSION="Master V8.00.000.2025.06.17"
|
||||
declare -grx VAR_SYSTEM="$(uname -a)"
|
||||
declare -gx VAR_ARG_SANITIZED=""
|
||||
declare -gx VAR_AUTO_INSTALL="false"
|
||||
declare -gx VAR_DEBUG_TRACE="false"
|
||||
declare -gx VAR_DEBUG_TRAP="false"
|
||||
declare -gx VAR_IN_DIALOG_WR="false"
|
||||
umask 0022
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
86
var/errors.var.sh
Normal file
86
var/errors.var.sh
Normal file
@@ -0,0 +1,86 @@
|
||||
#!/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 error codes
|
||||
declare -girx ERR_UNSUPPORTED_BASH=255 # Unsupported Bash.
|
||||
declare -girx ERR_USER_IS_NOT_ROOT=254 # Not running as root.
|
||||
declare -girx ERR_UNSAFE_CHARACTER=253 # Invalid Character used.
|
||||
declare -girx ERR_UNBOUND_VARIABLE=252 # Unbound Variable
|
||||
declare -girx ERR_TRAPPED_SIG_INT=251 # Installer caught an INT and confirmed by User.
|
||||
declare -girx ERR_FLOCK_PROTECTED=250 # Cannot open lockfile for writing.
|
||||
declare -girx ERR_FLOCK_COLLISION=249 # The Script is already running.
|
||||
declare -girx ERR_NO_DOWNLOAD_ARG=248 # 'scurl()' or 'swget()': No arguments specified.
|
||||
declare -girx ERR_DOWNLOAD_FAILED=247 # 'scurl()' or 'swget()': Download failed.
|
||||
declare -girx ERR_NO_VALID_RECIPE=246 # No valid RECIPE string found in partitioning.yaml
|
||||
declare -girx ERR_INVALID_IPV4=245 # IPv4 validation failure.
|
||||
declare -girx ERR_INVALID_IPV6=244 # IPv6 validation failure.
|
||||
declare -girx ERR_INVALID_PORT=243 # Port validation failure.
|
||||
declare -girx ERR_ARG_MISMATCH=242 # Wrong Number of optional Arguments provided.
|
||||
declare -girx ERR_PARTITIONTBL=241 # Not allowed Partition-table provided.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Definition of error trap vars
|
||||
declare -gx ERRCODE="" # = $? = $1 = ERRCODE
|
||||
declare -gx ERRSCRT="" # = ${BASH_SOURCE[0]} = $2 = ERRSCRT
|
||||
declare -gx ERRLINE="" # = ${LINENO} = $3 = ERRLINE
|
||||
declare -gx ERRFUNC="" # = ${FUNCNAME[0]:-main} = $4 = ERRFUNC
|
||||
declare -gx ERRCMMD="" # = ${$BASH_COMMAND} = $5 = ERRCMMD
|
||||
|
||||
|
||||
|
||||
declare -gir ERR_SPLASH_PNG=200 # --change-splash MUST be 'club' or 'hexagon'
|
||||
declare -gir ERR_CONTROL_CT=201 # --control MUST be an integer between '1' and '65535'
|
||||
declare -gir ERR_RENICE_PRI=202 # --renice-priority MUST an integer between '-19' and '19'
|
||||
declare -gir ERR_REIONICE_P=203 # --reionice-priority no values provided.
|
||||
declare -gir ERR_REIO_P_VAL=204 # --reionice-priority PRIORITY MUST be an integer between '0' and '7'
|
||||
declare -gir ERR_REIO_C_VAL=205 # --reionice-priority CLASS MUST be an integer between '1' and '3'
|
||||
declare -gir ERR_MISS_PWD_P=206 # --root-password-file missing password file path argument
|
||||
declare -gir ERR_MISS_PWD_F=207 # --root-password-file password file does not exist
|
||||
declare -gir ERR_OWNS_PWD_F=208 # --root-password-file failed to set owner root:root on the PWD file
|
||||
declare -gir ERR_RGHT_PWD_F=209 # --root-password-file failed to set permissions 0400 on the PWD file
|
||||
declare -gir ERR_PASS_LENGH=210 # --root-password-file password MUST be between 20 and 64 characters
|
||||
declare -gir ERR_PASS_PLICY=211 # --root-password-file password MUST NOT contain double quotes
|
||||
declare -gir ERR__SSH__PORT=212 # --ssh-port MUST be an integer between '1' and '65535'
|
||||
|
||||
declare -gir ERR_NOTABSPATH=252 # Not an absolute path
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
declare -g -i -r -x ERR_DO_NOT_SOURCE=110
|
||||
|
||||
|
||||
|
||||
declare -g -i -r -x ERR_NO_HIGHST_DEV=115
|
||||
declare -g -i -r -x ERR_WRONG_PARTTBL=116
|
||||
declare -g -i -r -x ERR_MOUNTING_PATH=117
|
||||
declare -g -i -r -x ERR_MOUNTING_ROOT=118
|
||||
declare -g -i -r -x ERR_CREAT_SUB_VOL=119
|
||||
declare -g -i -r -x ERR_NO_ENCR_LABEL=120
|
||||
declare -g -i -r -x ERR_NO_DEVIC_PATH=121
|
||||
declare -g -i -r -x ERR_UNSUPPT_TABLE=122
|
||||
declare -g -i -r -x ERR_DE_BOOT_STRAP=123
|
||||
declare -g -i -r -x ERR_CHROOT_MOUNTS=124
|
||||
declare -g -i -r -x ERR_UNEXCEPTIONAL=127
|
||||
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
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
|
||||
19
var/terminal.var.sh
Normal file
19
var/terminal.var.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/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
|
||||
|
||||
# shellcheck disable=SC2155
|
||||
declare -gix ROWS=$(tput lines)
|
||||
declare -gix COLS=$(tput cols)
|
||||
declare -gix ROWS_USE=$(($(tput lines) - 8))
|
||||
declare -gix COLS_USE=$(($(tput cols) - 8))
|
||||
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh:
|
||||
Reference in New Issue
Block a user