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

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-10-12 18:58:03 +01:00
parent 5f36d27c62
commit 140f82829e
8 changed files with 67 additions and 24 deletions

View File

@@ -31,10 +31,15 @@ dropbear_initramfs() {
chroot_script "${TARGET}" '
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests dropbear-initramfs 2>&1 | tee -a '"${var_logfile}"'
apt-get install -y --no-install-recommends --no-install-suggests dropbear-initramfs dropbear-bin 2>&1 | tee -a '"${var_logfile}"'
echo ExitCode: $? >> '"${var_logfile}"'
'
chroot_script "${TARGET}" '
export INITRD=No
apt-get purge -y dropbear dropbear-run || true
echo ExitCode: $? >> '"${var_logfile}"'
'
chroot_script "${TARGET}" '
export INITRD=No
@@ -42,14 +47,12 @@ dropbear_initramfs() {
echo ExitCode: $? >> '"${var_logfile}"'
'
chroot_script "${TARGET}" '
export INITRD=No
apt-mark hold dropbear dropbear-initramfs 2>&1 | tee -a '"${var_logfile}"'
echo ExitCode: $? >> '"${var_logfile}"'
'
mv "${TARGET}/usr/sbin/dropbear" "${TARGET}/usr/sbin/dropbear.trixie"
install -D -m 0755 -o root -g root "${DIR_TMP}/build/dropbear-2025.88/dropbear" "${TARGET}/usr/sbin/"
do_log "debug" "file_only" "4311() Installation [dropbear] successful."
@@ -73,7 +76,6 @@ Pin-Priority: -1
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=conf
EOF
insert_header "${TARGET}/etc/apt/preferences.d/99-mask-dropbear-initramfs"
insert_comments "${TARGET}/etc/apt/preferences.d/99-mask-dropbear-initramfs"
cat << 'EOF' >> "${TARGET}/etc/apt/preferences.d/99-mask-dropbear-initramfs"
@@ -85,10 +87,12 @@ Pin-Priority: -1
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=conf
EOF
chroot_script "${TARGET}" "systemctl mask dropbear.service dropbear.socket"
do_log "info" "file_only" "4311() Masked: [dropbear.service dropbear.socket]"
guard_dir && return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f dropbear_initramfs
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh