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