V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 51s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 51s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -33,8 +33,8 @@ installation_initramfs() {
|
|||||||
mkdir -p "${TARGET}/etc/initramfs-tools/files"
|
mkdir -p "${TARGET}/etc/initramfs-tools/files"
|
||||||
|
|
||||||
### Install the script to be called by 'update-initramfs' to enforce merged-/usr symlinks inside the initramfs image.
|
### Install the script to be called by 'update-initramfs' to enforce merged-/usr symlinks inside the initramfs image.
|
||||||
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/initramfs-tools/hooks/zzzz-custom-usrmerge.sh" \
|
#install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/initramfs-tools/hooks/9999-custom-usrmerge.sh" \
|
||||||
"${TARGET}/etc/initramfs-tools/hooks/"
|
# "${TARGET}/etc/initramfs-tools/hooks/"
|
||||||
|
|
||||||
### Install the script to be called by 'update-initramfs' for installing the necessary modules to load into initramfs environment.
|
### Install the script to be called by 'update-initramfs' for installing the necessary modules to load into initramfs environment.
|
||||||
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/initramfs-tools/modules" \
|
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/initramfs-tools/modules" \
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ dropbear_setup() {
|
|||||||
printf "%s\n" "${var_force_command_string}${user_root_sshpubkey}" >> "${TARGET}/etc/dropbear/initramfs/authorized_keys"
|
printf "%s\n" "${var_force_command_string}${user_root_sshpubkey}" >> "${TARGET}/etc/dropbear/initramfs/authorized_keys"
|
||||||
install -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/banner" "${TARGET}/etc/dropbear/initramfs/"
|
install -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/banner" "${TARGET}/etc/dropbear/initramfs/"
|
||||||
|
|
||||||
### Check for initramfs "IP"-variable: static or dynamic configuration vai dhcp.
|
### Check for initramfs "IP"-variable: static or dynamic configuration via dhcp.
|
||||||
if [[ "${dropbear_dhcp}" = "false" ]]; then
|
if [[ "${dropbear_dhcp}" = "false" ]]; then
|
||||||
|
|
||||||
### "IP=<HOST IP>::<GATEWAY IP>:<SUBNET MASK>:<FQDN>:<NIC>:none:<DNS 0 IP>:<DNS 1 IP>:<NTP IP>"
|
### "IP=<HOST IP>::<GATEWAY IP>:<SUBNET MASK>:<FQDN>:<NIC>:none:<DNS 0 IP>:<DNS 1 IP>:<NTP IP>"
|
||||||
@@ -75,19 +75,19 @@ dropbear_setup() {
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Generate dropbear configuration file
|
### Generate dropbear configuration file.
|
||||||
write_dropbear_conf
|
write_dropbear_conf
|
||||||
|
|
||||||
### Install the script to be called by 'update-initramfs' for updating 'PATH'-variable inside initramfs.
|
### Install the script to be called by 'update-initramfs' for updating 'PATH'-variable inside initramfs.
|
||||||
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/initramfs-tools/scripts/init-top/fixpath.sh" \
|
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/initramfs-tools/scripts/init-top/0000-fixpath.sh" \
|
||||||
"${TARGET}/etc/initramfs-tools/scripts/init-top/"
|
"${TARGET}/etc/initramfs-tools/scripts/init-top/"
|
||||||
|
|
||||||
### Install the script to be called by 'update-initramfs' for customizing dropbear inside initramfs.
|
### Install the script to be called by 'update-initramfs' for customizing dropbear inside initramfs.
|
||||||
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/initramfs-tools/hooks/custom-initramfs.sh" \
|
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/initramfs-tools/hooks/9999-custom-initramfs.sh" \
|
||||||
"${TARGET}/etc/initramfs-tools/hooks/"
|
"${TARGET}/etc/initramfs-tools/hooks/"
|
||||||
|
|
||||||
### Install the script to be called by 'update-initramfs' for customizing prompt inside initramfs environment.
|
### Install the script to be called by 'update-initramfs' for customizing prompt inside initramfs environment.
|
||||||
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/initramfs-tools/hooks/custom-prompt.sh" \
|
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/initramfs-tools/hooks/9999-custom-prompt.sh" \
|
||||||
"${TARGET}/etc/initramfs-tools/hooks/"
|
"${TARGET}/etc/initramfs-tools/hooks/"
|
||||||
|
|
||||||
### Install the script to be called inside initramfs environment for unlocking LUKS and NUKE Devices.
|
### Install the script to be called inside initramfs environment for unlocking LUKS and NUKE Devices.
|
||||||
@@ -99,8 +99,8 @@ dropbear_setup() {
|
|||||||
"${TARGET}/etc/initramfs-tools/files/"
|
"${TARGET}/etc/initramfs-tools/files/"
|
||||||
|
|
||||||
### Install the script to be called inside the initramfs environment for preparing dropbear execution.
|
### Install the script to be called inside the initramfs environment for preparing dropbear execution.
|
||||||
chroot_exec "${TARGET}" mv /usr/share/initramfs-tools/scripts/init-premount/dropbear /usr/share/initramfs-tools/scripts/init-premount/dropbear.trixie
|
chroot_exec "${TARGET}" mv /usr/share/initramfs-tools/scripts/init-premount/dropbear /root/.ciss/cdi/backup/dropbear.trixie
|
||||||
chmod 0644 "${TARGET}/usr/share/initramfs-tools/scripts/init-premount/dropbear.trixie"
|
chmod 0644 "${TARGET}/root/.ciss/cdi/backup/dropbear.trixie"
|
||||||
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/usr/share/initramfs-tools/scripts/init-premount/dropbear" \
|
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/usr/share/initramfs-tools/scripts/init-premount/dropbear" \
|
||||||
"${TARGET}/usr/share/initramfs-tools/scripts/init-premount/"
|
"${TARGET}/usr/share/initramfs-tools/scripts/init-premount/"
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ set -e
|
|||||||
|
|
||||||
PREREQ=""
|
PREREQ=""
|
||||||
prereqs() { echo "${PREREQ}"; }
|
prereqs() { echo "${PREREQ}"; }
|
||||||
case $1 in
|
case "${1}" in
|
||||||
prereqs) prereqs; exit 0 ;;
|
prereqs) prereqs; exit 0 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -54,13 +54,13 @@ printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/mkpasswd /usr/bin/mkpas
|
|||||||
copy_exec /usr/bin/udevadm /usr/bin/udevadm
|
copy_exec /usr/bin/udevadm /usr/bin/udevadm
|
||||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/udevadm /usr/bin/udevadm] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/udevadm /usr/bin/udevadm] \n\e[0m"
|
||||||
|
|
||||||
### Include sha512sum e.g.
|
### Include sha384sum, sha512sum
|
||||||
copy_exec /usr/bin/sha512sum /usr/bin/sha512sum
|
|
||||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/sha512sum /usr/bin/sha512sum] \n\e[0m"
|
|
||||||
copy_exec /usr/bin/sha384sum /usr/bin/sha384sum
|
copy_exec /usr/bin/sha384sum /usr/bin/sha384sum
|
||||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/sha384sum /usr/bin/sha384sum] \n\e[0m"
|
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 GPG
|
### Include GPGV
|
||||||
copy_exec /usr/bin/gpgv /usr/bin/gpgv
|
copy_exec /usr/bin/gpgv /usr/bin/gpgv
|
||||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/gpgv /usr/bin/gpgv] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/gpgv /usr/bin/gpgv] \n\e[0m"
|
||||||
|
|
||||||
@@ -98,6 +98,6 @@ printf "\e[92mSuccessfully executed: [install -m 0444 /etc/dropbear/initramfs/ba
|
|||||||
install -m 0444 /etc/dropbear/initramfs/banner "${DESTDIR}/etc/dropbear/initramfs/banner"
|
install -m 0444 /etc/dropbear/initramfs/banner "${DESTDIR}/etc/dropbear/initramfs/banner"
|
||||||
printf "\e[92mSuccessfully executed: [install -m 0444 /etc/dropbear/initramfs/banner %s/etc/dropbear/initramfs/banner] \n\e[0m" "${DESTDIR}"
|
printf "\e[92mSuccessfully executed: [install -m 0444 /etc/dropbear/initramfs/banner %s/etc/dropbear/initramfs/banner] \n\e[0m" "${DESTDIR}"
|
||||||
|
|
||||||
printf "\e[92mSuccessfully executed: [/etc/initramfs-tools/hooks/custom-initramfs.sh] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [/etc/initramfs-tools/hooks/9999-custom-initramfs.sh] \n\e[0m"
|
||||||
|
|
||||||
# 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
|
||||||
@@ -15,7 +15,7 @@ set -e
|
|||||||
|
|
||||||
PREREQ=""
|
PREREQ=""
|
||||||
prereqs() { echo "${PREREQ}"; }
|
prereqs() { echo "${PREREQ}"; }
|
||||||
case $1 in
|
case "${1}" in
|
||||||
prereqs) prereqs; exit 0 ;;
|
prereqs) prereqs; exit 0 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -32,6 +32,6 @@ export PS1='$( STATUS=$?; \
|
|||||||
fi; ) '
|
fi; ) '
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
printf "\e[92mSuccessfully executed: [/etc/initramfs-tools/hooks/custom-prompt.sh] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [/etc/initramfs-tools/hooks/9999-custom-prompt.sh] \n\e[0m"
|
||||||
|
|
||||||
# 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
|
||||||
@@ -15,7 +15,7 @@ set -e
|
|||||||
|
|
||||||
PREREQ=""
|
PREREQ=""
|
||||||
prereqs() { echo "${PREREQ}"; }
|
prereqs() { echo "${PREREQ}"; }
|
||||||
case $1 in
|
case "${1}" in
|
||||||
prereqs) prereqs; exit 0 ;;
|
prereqs) prereqs; exit 0 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -67,6 +67,6 @@ move_dir_into_usr lib
|
|||||||
# shellcheck disable=2292
|
# shellcheck disable=2292
|
||||||
[ -d "${DESTDIR}/usr/lib64" ] && move_dir_into_usr lib64
|
[ -d "${DESTDIR}/usr/lib64" ] && move_dir_into_usr lib64
|
||||||
|
|
||||||
printf "\e[92mSuccessfully executed: [/etc/initramfs-tools/hooks/zzzz-custom-usrmerge.sh] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [/etc/initramfs-tools/hooks/9999-custom-usrmerge.sh] \n\e[0m"
|
||||||
|
|
||||||
# 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
|
||||||
@@ -12,6 +12,12 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
PREREQ=""
|
||||||
|
prereqs() { echo "${PREREQ}"; }
|
||||||
|
case "${1}" in
|
||||||
|
prereqs) prereqs; exit 0 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
### Make sure /usr/local/bin is in front of 'PATH'.
|
### Make sure /usr/local/bin is in front of 'PATH'.
|
||||||
export PATH="/usr/local/bin:${PATH:-/sbin:/usr/sbin:/bin:/usr/bin}"
|
export PATH="/usr/local/bin:${PATH:-/sbin:/usr/sbin:/bin:/usr/bin}"
|
||||||
|
|
||||||
Reference in New Issue
Block a user