#!/bin/bash # SPDX-Version: 3.0 # SPDX-CreationInfo: 2025-06-17; WEIDNER, Marc S.; # 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.; # 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 guard_sourcing ####################################### # Prepare '/etc/skel'-Directory. # Globals: # TARGET # VAR_SETUP_PATH # Arguments: # None # Returns: # 0: on success ####################################### accounts_preparation() { ### Declare Arrays, HashMaps, and Variables. declare -r var_logfile="/root/.ciss/cdi/log/4130_installation_toolset.log" chroot_logger "${TARGET}${var_logfile}" chroot_script "${TARGET}" " export INITRD=No apt-get install -y --no-install-recommends --no-install-suggests bash-completion fzf 2>&1 | tee -a ${var_logfile} echo ExitCode of PIPESTATUS[0]: [\${PIPESTATUS[0]}] >> ${var_logfile} " mkdir -p "${TARGET}/etc/skel/.ciss" install -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/skel/.bashrc" "${TARGET}/etc/skel/.bashrc" install -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/skel/.zshrc" "${TARGET}/etc/skel/.zshrc" install -m 0700 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/skel/.ciss/check_chrony.sh" "${TARGET}/etc/skel/.ciss/" install -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/skel/.ciss/theme_eza_ciss.yml" "${TARGET}/etc/skel/.ciss/" install -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/root/.ciss/alias" "${TARGET}/etc/skel/.ciss/alias" install -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/root/.ciss/clean_logout.sh" "${TARGET}/etc/skel/.ciss/clean_logout.sh" install -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/root/.ciss/f2bchk.sh" "${TARGET}/etc/skel/.ciss/f2bchk.sh" install -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/root/.ciss/scan_libwrap" "${TARGET}/etc/skel/.ciss/scan_libwrap" install -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/root/.ciss/shortcuts" "${TARGET}/etc/skel/.ciss/shortcuts" insert_comments "${TARGET}/etc/skel/.bashrc" insert_comments "${TARGET}/etc/skel/.zshrc" insert_comments "${TARGET}/etc/skel/.ciss/alias" insert_comments "${TARGET}/etc/skel/.ciss/clean_logout.sh" insert_comments "${TARGET}/etc/skel/.ciss/f2bchk.sh" insert_comments "${TARGET}/etc/skel/.ciss/scan_libwrap" insert_comments "${TARGET}/etc/skel/.ciss/shortcuts" ### In order to be able to copy/paste from vim, one needs to create a '.vimrc' in every home directory with the following content: echo 'set clipboard=unnamed' >| "${TARGET}/etc/skel/.vimrc" chmod 0600 "${TARGET}/etc/skel/.vimrc" guard_dir && return 0 } # vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh