V8.13.404.2025.11.10
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# SPDX-Version: 3.0
|
||||
# SPDX-CreationInfo: 2025-10-11; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-CreationInfo: 2025-11-10; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
|
||||
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
||||
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
@@ -339,138 +339,10 @@ FSTYPE=auto
|
||||
|
||||
EOF
|
||||
|
||||
cat << EOF >| /etc/initramfs-tools/hooks/ciss_debian_live_builder
|
||||
#!/bin/sh
|
||||
# SPDX-Version: 3.0
|
||||
# SPDX-CreationInfo: ${VAR_DATE}; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.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.live.builder
|
||||
# SPDX-Security-Contact: security@coresecret.eu
|
||||
|
||||
EOF
|
||||
|
||||
cat << 'EOF' >> /etc/initramfs-tools/hooks/ciss_debian_live_builder
|
||||
set -e
|
||||
|
||||
printf "\e[95mStarting: [ciss_debian_live_builder] \n\e[0m"
|
||||
|
||||
PREREQ=""
|
||||
prereqs() { echo "${PREREQ}"; }
|
||||
# shellcheck disable=SC2249
|
||||
case "${1}" in
|
||||
prereqs) prereqs; exit 0 ;;
|
||||
esac
|
||||
|
||||
. /usr/share/initramfs-tools/hook-functions
|
||||
|
||||
|
||||
### Ensure directory structure in initramfs ------------------------------------------------------------------------------------
|
||||
install -d -m 0755 "${DESTDIR}/etc/ciss/keys"
|
||||
install -d -m 0755 "${DESTDIR}/etc/initramfs-tools/conf.d"
|
||||
install -d -m 0755 "${DESTDIR}/etc/initramfs-tools/scripts/init-premount"
|
||||
install -d -m 0755 "${DESTDIR}/usr/bin"
|
||||
install -d -m 0755 "${DESTDIR}/usr/local/bin"
|
||||
install -d -m 0755 "${DESTDIR}/usr/sbin"
|
||||
|
||||
|
||||
### Include 'bash' -------------------------------------------------------------------------------------------------------------
|
||||
copy_exec /usr/bin/bash /usr/bin/bash
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/bash /usr/bin/bash] \n\e[0m"
|
||||
|
||||
|
||||
### Include 'blkid' ------------------------------------------------------------------------------------------------------------
|
||||
copy_exec /usr/sbin/blkid /usr/sbin/blkid
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/sbin/blkid /usr/sbin/blkid] \n\e[0m"
|
||||
|
||||
|
||||
### Include 'busybox' ----------------------------------------------------------------------------------------------------------
|
||||
copy_exec /usr/bin/busybox /usr/busybox
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/busybox /usr/busybox] \n\e[0m"
|
||||
|
||||
|
||||
### Include GNU coreutils 'sort' (has -V) --------------------------------------------------------------------------------------
|
||||
copy_exec /usr/bin/sort /usr/bin/sort
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/sort /usr/bin/sort] \n\e[0m"
|
||||
|
||||
|
||||
### Include 'gpgv' -------------------------------------------------------------------------------------------------------------
|
||||
copy_exec /usr/bin/gpgv /usr/bin/gpgv
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/gpgv /usr/bin/gpgv] \n\e[0m"
|
||||
|
||||
|
||||
### Include 'lsblk' ------------------------------------------------------------------------------------------------------------
|
||||
copy_exec /usr/bin/lsblk /usr/bin/lsblk
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/lsblk /usr/bin/lsblk] \n\e[0m"
|
||||
|
||||
|
||||
### Include 'mkpasswd' ---------------------------------------------------------------------------------------------------------
|
||||
copy_exec /usr/bin/mkpasswd /usr/mkpasswd
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/mkpasswd /usr/mkpasswd] \n\e[0m"
|
||||
copy_exec /usr/bin/mkpasswd /usr/bin/mkpasswd
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/mkpasswd /usr/bin/mkpasswd] \n\e[0m"
|
||||
|
||||
|
||||
### Include 'udevadm' (udev management tool) -----------------------------------------------------------------------------------
|
||||
copy_exec /usr/bin/udevadm /usr/bin/udevadm
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/udevadm /usr/bin/udevadm] \n\e[0m"
|
||||
|
||||
|
||||
### Include 'sha384sum' 'sha512sum' --------------------------------------------------------------------------------------------
|
||||
copy_exec /usr/bin/sha384sum /usr/bin/sha384sum
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/sha384sum /usr/bin/sha384sum ] \n\e[0m"
|
||||
copy_exec /usr/bin/sha512sum /usr/bin/sha512sum
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/sha512sum /usr/bin/sha512sum] \n\e[0m"
|
||||
|
||||
|
||||
### Include 'tree' -------------------------------------------------------------------------------------------------------------
|
||||
copy_exec /usr/bin/tree /usr/bin/tree
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/tree /usr/bin/tree] \n\e[0m"
|
||||
|
||||
|
||||
### Include 'whois' ------------------------------------------------------------------------------------------------------------
|
||||
copy_exec /usr/bin/whois /usr/bin/whois
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/whois /usr/bin/whois] \n\e[0m"
|
||||
|
||||
|
||||
### Link busybox applets for compatibility -------------------------------------------------------------------------------------
|
||||
for dir in bin usr/bin; do
|
||||
ln -sf busybox "${DESTDIR}/${dir}/cat"
|
||||
ln -sf busybox "${DESTDIR}/${dir}/sleep"
|
||||
done
|
||||
|
||||
|
||||
### Install GPG signing keys ---------------------------------------------------------------------------------------------------
|
||||
src_dir="/etc/ciss/keys"
|
||||
dst_dir="${DESTDIR}/etc/ciss/keys"
|
||||
key=""
|
||||
|
||||
if [ -d "${src_dir}" ]; then
|
||||
|
||||
install -d -m 0755 "${dst_dir}"
|
||||
|
||||
for key in "${src_dir}"/*.gpg; do
|
||||
|
||||
[ -e "${key}" ] || continue
|
||||
|
||||
install -m 0444 "${key}" "${dst_dir}/"
|
||||
|
||||
printf '\e[92mSuccessfully executed: [install -m 0444 %s %s]\n\e[0m' "${key}" "${dst_dir}"
|
||||
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
printf "\e[92mSuccessfully executed: [ciss_debian_live_builder] \n\e[0m"
|
||||
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
EOF
|
||||
|
||||
chmod 0755 /etc/initramfs-tools/hooks/ciss_debian_live_builder
|
||||
chmod 0755 /etc/initramfs-tools/hooks/9999_ciss_custom_prompt.sh
|
||||
chmod 0755 /etc/initramfs-tools/hooks/9999_ciss_debian_live_builder.sh
|
||||
chmod 0755 /etc/initramfs-tools/scripts/init-premount/1000_ciss_fixpath.sh
|
||||
chmod 0755 /etc/initramfs-tools/scripts/init-top/0000_ciss_fixpath.sh
|
||||
|
||||
printf "\e[92m++++ ++++ ++++ ++++ ++++ ++++ ++ ✅ '%s' applied successfully. \e[0m\n" "${0}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user