V8.00.000.2025.06.17
Some checks failed
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Failing after 9s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-07-24 19:27:38 +02:00
parent 51459744e7
commit abef97b796

View File

@@ -10,86 +10,115 @@
# SPDX-PackageName: CISS.debian.installer # SPDX-PackageName: CISS.debian.installer
# SPDX-Security-Contact: security@coresecret.eu # SPDX-Security-Contact: security@coresecret.eu
#######################################
# Header, Footer wrapper for dynamically output.
# Arguments:
# 1: Text.
# 2: Width of Terminal.
#######################################
center() {
declare var_text="$1"
declare var_width="$2"
declare var_padding=$(( (var_width - ${#var_text}) / 2 ))
printf "%*s%s%*s\n" "${var_padding}" "" "${var_text}" "${var_padding}" ""
}
####################################### #######################################
# Usage Wrapper 'CISS.debian.installer'. # Usage Wrapper 'CISS.debian.installer'.
# Arguments: # Arguments:
# $0: Script Name # $0: Script Name
####################################### #######################################
usage() { usage() {
clear # shellcheck disable=SC2155
cat << EOF declare var_cols=$(tput cols 2> /dev/null || echo 80)
$(echo -e "\e[92mCISS.debian.installer\e[0m")
$(echo -e "\e[92mMaster V8.00.000.2025.06.17\e[0m")
$(echo -e "\e[92mA powerful Debian installer for setting up a hardened Debian environment.\e[0m")
$(echo -e "\e[97m(c) Marc S. Weidner, 2018 - 2025\e[0m") # shellcheck disable=SC2155
$(echo -e "\e[97m(p) Centurion Press, 2024 - 2025\e[0m") declare var_header=$(center "V8.00.000.2025.06.17 CISS.debian.installer" "${var_cols}")
# shellcheck disable=SC2155
declare var_footer=$(center "V8.00.000.2025.06.17 CISS.debian.installer" "${var_cols}")
"${0} <option>", where <option> is one or more of: {
echo -e "\e[97m${var_header} \e[0m"
--help, -h echo
What you're looking at. echo -e "\e[92mCISS.debian.installer from https://git.coresecret.dev/msw \e[0m"
echo -e "\e[92mMaster V8.00.000.2025.06.17 \e[0m"
--autoinstall, -a echo -e "\e[92mA powerful Debian installer for setting up a hardened Debian environment. \e[0m"
No user interaction is required in autoinstall mode. echo
$(echo -e "\e[93m ⚡ All data on the disks specified in './.preseed/partitioning.yaml' will be destroyed! ⚡\e[0m") echo -e "\e[97m(c) Marc S. Weidner, 2018 - 2025 \e[0m"
echo -e "\e[97m(p) Centurion Press, 2024 - 2025 \e[0m"
--contact, -c echo
Displays contact information of the author. echo -e "\e[97m${0} <option>, where <option> is one or more of: \e[0m"
echo
--debug, -d <MODE> echo -e "\e[97m --help, -h \e[0m"
Whereas <MODE> can be one or both of the following: 'TRAP' or 'XTRACE'. echo " What you're looking at."
- XTRACE uses the 'set -x' capability to trace every command executed. echo
- TRAP uses the bash 'trap DEBUG' capability. echo -e "\e[97m --autoinstall, -a \e[0m"
$(echo -e "\e[93m Detailed debugging information is written to:\e[0m") echo -e "\e[93m ⚡ All data on the disks specified in './.preseed/partitioning.yaml' will be destroyed! ⚡\e[0m"
- /tmp/ciss_debian_installer_$$_debug.log echo " Headless mode. Skip the dialog wrapper, provider note screen and interactive kernel selector dialog."
- /tmp/ciss_debian_installer_$$_trace.log echo " No user interaction is required in autoinstall mode."
- /tmp/ciss_debian_installer_$$_var.log echo
$(echo -e "\e[93m Errors are always written to:\e[0m") echo -e "\e[97m --contact, -c\ e[0m"
- /tmp/ciss_debian_installer_$$_error.log. echo " Show author contact information."
echo
--log <LEVEL> echo -e "\e[97m --debug, -d <MODE> \e[0m"
This changes the default log level from 'info' to one of the following values: echo " Whereas <MODE> can be one or both of the following: 'TRAP' or 'XTRACE'."
6: 'info' echo " - XTRACE uses the 'set -x' capability to trace every command executed."
5: 'notice' echo " - TRAP uses the bash 'trap DEBUG' capability."
4: 'warn' echo -e "\e[93m Detailed debugging information is written to: \e[0m"
3: 'error' echo " - /tmp/.ciss/log/ciss_debian_installer_$$_debug.log"
0: 'emergency' echo " - /tmp/.ciss/log/ciss_debian_installer_$$_trace.log"
$(echo -e "\e[93m The installation log is written to:\e[0m") echo " - /tmp/.ciss/log/ciss_debian_installer_$$_var.log"
- /tmp/ciss_debian_installer_$$_install.log echo -e "\e[93m Errors are always written to: \e[0m"
echo " - /tmp/.ciss/log/ciss_debian_installer_$$_error.log"
--renice-priority <PRIORITY> echo
Reset the nice priority value of the script and all its children echo -e "\e[97m --log, -l <LEVEL>\ e[0m"
to the desired <PRIORITY>. MUST be an integer (between "-19" and 19). echo " This changes the default log level from 'info' to one of the following values:"
Negative (higher) values MUST be enclosed in double quotes '"'. echo " 6: 'info'"
echo " 5: 'notice'"
--reionice-priority <CLASS> <PRIORITY> echo " 4: 'warn'"
Reset the ionice priority value of the script and all its children echo " 3: 'error'"
to the desired <CLASS>. MUST be an integer: echo " 2: 'critical'"
1: realtime echo " 1: 'fatal'"
2: best-effort echo " 0: 'emergency'"
3: idle echo -e "\e[93m The installation log is written to: \e[0m"
Defaults to '2'. echo " - /tmp/ciss_debian_installer_$$_install.log"
Whereas <PRIORITY> MUST be an integer as well between: echo
0: highest priority and echo -e "\e[97m --renice-priority <PRIORITY> \e[0m"
7: lowest priority. echo " Reset the nice priority value of the script and all its children"
Defaults to '4'. echo " to the desired <PRIORITY>. MUST be an integer (between '-19' and 19)."
A real-time I/O process can significantly slow down other processes echo " Negative (higher) values MUST be enclosed in double quotes '\"'."
or even cause them to starve if it continuously requests I/O. echo
echo -e "\e[97m --reionice-priority <CLASS> <PRIORITY> \e[0m"
--version, -v echo " Reset the ionice priority value of the script and all its children"
Displays version of ${0}. echo " to the desired <CLASS>. MUST be an integer:"
echo " 1: realtime"
$(echo -e "\e[93m💡 Notes:\e[0m") echo " 2: best-effort"
🔵 You MUST be 'root' to run this script. echo " 3: idle"
🔵 You MUST edit './.preseed/preseed.yaml' in advance. echo " Defaults to '2'."
🔵 You MUST edit './.preseed/partitioning.yaml' in advance. echo " Whereas <PRIORITY> MUST be an integer as well between:"
🔵 You MUST edit './.preseed/password.txt' in advance. echo " 0: highest priority and"
🔵 You SHOULD use the provided YAML-Configuration-File Editor. echo " 7: lowest priority."
echo " Defaults to '4'."
$(echo -e "\e[95m💷 Please consider donating to my work at:\e[0m") echo " A real-time I/O process can significantly slow down other processes"
$(echo -e "\e[95m🌐 https://coresecret.eu/spenden/ \e[0m") echo " or even cause them to starve if it continuously requests I/O."
echo
EOF echo -e "\e[97m --version, -v \e[0m"
echo " Show version of ${0}."
echo
echo -e "\e[93m💡 Notes:\e[0m"
echo -e "\e[97m🔵 You MUST be 'root' to run this script. \e[0m"
echo -e "\e[97m🔵 You MUST edit './.preseed/preseed.yaml' in advance. \e[0m"
echo -e "\e[97m🔵 You MUST edit './.preseed/partitioning.yaml' in advance. \e[0m"
echo -e "\e[97m🔵 You MUST edit './.preseed/password_grub.txt' in advance. \e[0m"
echo -e "\e[97m🔵 You MUST edit './.preseed/password_luks_boot.txt' in advance. \e[0m"
echo -e "\e[97m🔵 You MUST edit './.preseed/password_luks_common.txt' in advance. \e[0m"
echo -e "\e[97m🔵 You MUST edit './.preseed/password_luks_nuke.txt' in advance. \e[0m"
echo -e "\e[97m🔵 You SHOULD use the provided YAML-Configuration-File Editor. \e[0m"
echo
echo -e "\e[95m💷 Please consider donating to my work at: \e[0m"
echo -e "\e[95m🌐 https://coresecret.eu/spenden/ \e[0m"
echo
echo -e "\e[97m${var_footer} \e[0m"
} | less -R
} }
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh # vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh