V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 53s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-08-07 19:24:19 +02:00
parent b677595f9d
commit 01501f92be
11 changed files with 46 additions and 42 deletions

View File

@@ -38,7 +38,7 @@ kernel_modules() {
jitterentropy_rng
EOF
chmod 0644 "${TARGET}/usr/lib/modules-load.d/30_security-misc.conf"
do_log "info" "file_only" "Installed: '/usr/lib/modules-load.d/30_security-misc.conf'."
do_log "info" "file_only" "4400() Installed: '/usr/lib/modules-load.d/30_security-misc.conf'."
return 0
}
@@ -53,9 +53,9 @@ EOF
# 0: on success
#######################################
setup_modprobe() {
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/etc/modprobe.d/0000_ciss_debian_installer.cnf" \
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/modprobe.d/0000_ciss_debian_installer.cnf" \
"${TARGET}/etc/modprobe.d/0000_ciss_debian_installer.conf"
do_log "info" "file_only" "Installed: '/etc/modprobe.d/0000_ciss_debian_installer.conf'."
do_log "info" "file_only" "4400() Installed: '/etc/modprobe.d/0000_ciss_debian_installer.conf'."
return 0
}
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -23,9 +23,9 @@ guard_sourcing
# 0: on success
#######################################
kernel_sysctl() {
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/etc/sysctl.d/99_local.hardened.ini" \
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/sysctl.d/99_local.hardened.ini" \
"${TARGET}/etc/sysctl.d/99_local.hardened"
do_log "info" "file_only" "Installed: '/etc/sysctl.d/99_local.hardened'."
do_log "info" "file_only" "4410() Installed: '/etc/sysctl.d/99_local.hardened'."
return 0
}
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -31,18 +31,16 @@ guard_sourcing
# 0: on success
#######################################
installation_ssh() {
do_in_target "${TARGET}" apt-get install -y ssh
#######################################
# Variable declaration
#######################################
### Declare Arrays, HashMaps, and Variables.
declare -a ary_user=()
declare -i i
declare var_auth="" var_name=""
declare -i i=0
declare var_auth="" var_name=""
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/etc/banner" "${TARGET}/etc/"
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/etc/motd" "${TARGET}/etc/"
do_log "info" "file_only" "Installed SSH banner and motd to '${TARGET}/etc/'."
do_in_target "${TARGET}" apt-get install -y --no-install-recommends --no-install-suggests ssh
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/banner" "${TARGET}/etc/"
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/motd" "${TARGET}/etc/"
do_log "info" "file_only" "4420() Installed SSH banner and motd to '${TARGET}/etc/'."
### Only process those for which both *_name and *_authentication_access_ssh are set.
for ((i = 0; i <= VAR_USER_MAX; i++)); do
@@ -69,7 +67,7 @@ installation_ssh() {
rm -f "${TARGET}/etc/ssh/sshd_config"
install -D -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/etc/ssh/sshd_config" "${TARGET}/etc/ssh/sshd_config"
install -D -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/ssh/sshd_config" "${TARGET}/etc/ssh/sshd_config"
chmod 0600 "${TARGET}/etc/ssh/ssh_config"
# shellcheck disable=SC2153
@@ -107,6 +105,8 @@ installation_ssh() {
#echo "readonly HISTFILE" >> "${TARGET}/etc/profile.d/idle-users.sh"
chmod +x "${TARGET}/etc/profile.d/idle-users.sh"
do_log "info" "file_only" "4420() Installed: [ssh] successfully."
return 0
}
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -35,7 +35,7 @@ installation_skel() {
echo 'set clipboard=unnamed' >| "${TARGET}/etc/skel/.vimrc"
chmod 0644 "${TARGET}/etc/skel/.vimrc"
do_log "info" "file_only" "4095() Installed: '/etc/skel'-Files."
do_log "info" "file_only" "4430() Installed: [/etc/skel]-Files successfully."
return 0
}