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

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-09-06 00:51:07 +02:00
parent 2ba2682438
commit 9ae7b19036

View File

@@ -57,12 +57,11 @@ dropbear_initramfs() {
do_log "debug" "file_only" "4311() Installation [${var_file}] successful." do_log "debug" "file_only" "4311() Installation [${var_file}] successful."
done done
insert_header "${TARGET}/etc/apt/preferences.d/99-prefer-openssh"
insert_comments "${TARGET}/etc/apt/preferences.d/99-prefer-openssh"
cat << EOF >> "${TARGET}/etc/apt/preferences.d/99-prefer-openssh"
# Prevent the dropbear *daemon* from being installed at all.
# DO NOT block 'dropbear-bin' needed by 'dropbear-initramfs'.
insert_header "${TARGET}/etc/apt/preferences.d/99-mask-dropbear"
insert_comments "${TARGET}/etc/apt/preferences.d/99-mask-dropbear"
cat << 'EOF' >> "${TARGET}/etc/apt/preferences.d/99-mask-dropbear"
# Never install the dropbear daemon package at all.
Package: dropbear Package: dropbear
Pin: release * Pin: release *
Pin-Priority: -1 Pin-Priority: -1
@@ -70,6 +69,20 @@ Pin-Priority: -1
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=conf # vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=conf
EOF 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"
# Keep the currently installed initramfs integration; never upgrade it.
Package: dropbear-initramfs
Pin: release *
Pin-Priority: -1
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=conf
EOF
chroot_script "${TARGET}" "apt-mark hold dropbear dropbear-initramfs"
do_log "info" "file_only" "4311() Hold: [apt-mark hold dropbear dropbear-initramfs]"
chroot_script "${TARGET}" "systemctl mask dropbear.service dropbear.socket" chroot_script "${TARGET}" "systemctl mask dropbear.service dropbear.socket"
do_log "info" "file_only" "4311() Masked: [dropbear.service dropbear.socket]" do_log "info" "file_only" "4311() Masked: [dropbear.service dropbear.socket]"