V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m9s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m9s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -80,7 +80,7 @@ dropbear_setup() {
|
|||||||
|
|
||||||
### 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/0000-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/0000-fixpath"
|
||||||
|
|
||||||
### 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/9999-custom-initramfs.sh" \
|
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/initramfs-tools/hooks/9999-custom-initramfs.sh" \
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ fi)\
|
|||||||
#######################################
|
#######################################
|
||||||
read_passphrase() {
|
read_passphrase() {
|
||||||
declare -i ROUNDS=0
|
declare -i ROUNDS=0
|
||||||
declare CAND="" SALT="" _FULL_SALT=""
|
declare CAND="" SALT=""
|
||||||
|
|
||||||
### Read from SSH STDIN (or TTY fallback), never via '/lib/cryptsetup/askpass'.
|
### Read from SSH STDIN (or TTY fallback), never via '/lib/cryptsetup/askpass'.
|
||||||
ask_via_stdin "Enter passphrase: " PASSPHRASE
|
ask_via_stdin "Enter passphrase: " PASSPHRASE
|
||||||
@@ -274,7 +274,7 @@ read_passphrase() {
|
|||||||
ROUNDS="$(cut -d'$' -f3 <<< "${NUKE_HASH}")"
|
ROUNDS="$(cut -d'$' -f3 <<< "${NUKE_HASH}")"
|
||||||
ROUNDS="${ROUNDS#rounds=}"
|
ROUNDS="${ROUNDS#rounds=}"
|
||||||
SALT="$(cut -d'$' -f4 <<< "${NUKE_HASH}")"
|
SALT="$(cut -d'$' -f4 <<< "${NUKE_HASH}")"
|
||||||
CAND=$(/usr/bin/mkpasswd --method=sha-512 --salt="${SALT}" --rounds="${ROUNDS}" "${PASSPHRASE}")
|
CAND=$(/usr/mkpasswd --method=sha-512 --salt="${SALT}" --rounds="${ROUNDS}" "${PASSPHRASE}")
|
||||||
|
|
||||||
# TODO: DEBUGGER
|
# TODO: DEBUGGER
|
||||||
echo "ROUNDS : ${ROUNDS}"
|
echo "ROUNDS : ${ROUNDS}"
|
||||||
|
|||||||
@@ -28,27 +28,37 @@ if [ ! -e /etc/initramfs-tools/files/unlock_wrapper.sh ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
### Ensure directory structure in initramfs
|
### Ensure directory structure in initramfs
|
||||||
|
mkdir -p "${DESTDIR}/usr/bin"
|
||||||
mkdir -p "${DESTDIR}/etc/dropbear/initramfs"
|
mkdir -p "${DESTDIR}/etc/dropbear/initramfs"
|
||||||
mkdir -p "${DESTDIR}/etc/keys"
|
mkdir -p "${DESTDIR}/etc/keys"
|
||||||
mkdir -p "${DESTDIR}/usr/local/bin"
|
mkdir -p "${DESTDIR}/usr/local/bin"
|
||||||
mkdir -p "${DESTDIR}/etc/initramfs-tools/conf.d"
|
mkdir -p "${DESTDIR}/etc/initramfs-tools/conf.d"
|
||||||
mkdir -p "${DESTDIR}/etc/initramfs-tools/scripts/init-premount"
|
mkdir -p "${DESTDIR}/etc/initramfs-tools/scripts/init-premount"
|
||||||
|
mkdir -p "${DESTDIR}/usr/sbin"
|
||||||
|
|
||||||
### Include Bash
|
### Include bash
|
||||||
copy_exec /usr/bin/bash /usr/bin/bash
|
copy_exec /usr/bin/bash /usr/bin/bash
|
||||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/bash /usr/bin/bash] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/bash /usr/bin/bash] \n\e[0m"
|
||||||
|
|
||||||
### Include Busybox
|
### Include blkid
|
||||||
copy_exec /usr/bin/busybox /usr/bin/busybox
|
copy_exec /usr/sbin/blkid /usr/sbin/blkid
|
||||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/busybox /usr/bin/busybox] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [copy_exec /usr/sbin/blkid /usr/sbin/blkid] \n\e[0m"
|
||||||
|
|
||||||
### Include lsblk (block device info tool)
|
### Include busybox
|
||||||
|
copy_exec /usr/bin/busybox /usr/busybox
|
||||||
|
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/busybox /usr/busybox] \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
|
copy_exec /usr/bin/lsblk /usr/bin/lsblk
|
||||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/lsblk /usr/bin/lsblk] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/lsblk /usr/bin/lsblk] \n\e[0m"
|
||||||
|
|
||||||
### Include mkpasswd
|
### Include mkpasswd
|
||||||
copy_exec /usr/bin/mkpasswd /usr/bin/mkpasswd
|
copy_exec /usr/bin/mkpasswd /usr/mkpasswd
|
||||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/mkpasswd /usr/bin/mkpasswd] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/mkpasswd /usr/mkpasswd] \n\e[0m"
|
||||||
|
|
||||||
### Include udevadm (udev management tool)
|
### Include udevadm (udev management tool)
|
||||||
copy_exec /usr/bin/udevadm /usr/bin/udevadm
|
copy_exec /usr/bin/udevadm /usr/bin/udevadm
|
||||||
@@ -56,15 +66,15 @@ printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/udevadm /usr/bin/udevad
|
|||||||
|
|
||||||
### Include sha384sum, sha512sum
|
### Include sha384sum, sha512sum
|
||||||
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
|
copy_exec /usr/bin/sha512sum /usr/bin/sha512sum
|
||||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/sha512sum /usr/bin/sha512sum] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/sha512sum /usr/bin/sha512sum] \n\e[0m"
|
||||||
|
|
||||||
### Include GPGV
|
### Include tree
|
||||||
copy_exec /usr/bin/gpgv /usr/bin/gpgv
|
copy_exec /usr/bin/tree /usr/bin/tree
|
||||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/gpgv /usr/bin/gpgv] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/tree /usr/bin/tree] \n\e[0m"
|
||||||
|
|
||||||
### Include Whois
|
### Include whois
|
||||||
copy_exec /usr/bin/whois /usr/bin/whois
|
copy_exec /usr/bin/whois /usr/bin/whois
|
||||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/whois /usr/bin/whois] \n\e[0m"
|
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/whois /usr/bin/whois] \n\e[0m"
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ case "${1}" in
|
|||||||
esac
|
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}"
|
||||||
|
export PATH="/usr/local/bin:/usr:/sbin:/usr/sbin:/bin:/usr/bin"
|
||||||
|
|
||||||
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user