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

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-10-13 19:51:43 +01:00
parent f222665cad
commit ad4c56fdb5
24 changed files with 52 additions and 137 deletions

View File

@@ -46,22 +46,16 @@ installation_network() {
chroot_script "${TARGET}" "
export INITRD=No
apt-get purge -y dhcpcd isc-dhcp-client 2>&1 | tee -a ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-suggests dhcpcd-base ifupdown 2>&1 | tee -a ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
chroot_script "${TARGET}" "
export INITRD=No
systemctl disable systemd-networkd NetworkManager 2>/dev/null | tee -a ${var_logfile} || true
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
mkdir -p "${TARGET}/etc/network/interfaces.d"
@@ -233,8 +227,6 @@ EOF
### Check dhcpcd connectivity.
chroot_script "${TARGET}" "
dhcpcd -T ${VAR_FINAL_NIC} | tee -a ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
guard_dir && return 0

View File

@@ -30,8 +30,6 @@ installation_netsec() {
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-suggests fail2ban ufw 2>&1 | tee -a ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
guard_dir && return 0

View File

@@ -29,29 +29,25 @@ dropbear_initramfs() {
chroot_logger "${TARGET}${var_logfile}"
chroot_script "${TARGET}" '
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests dropbear-initramfs dropbear-bin 2>&1 | tee -a '"${var_logfile}"'
echo ExitCode: $? >> '"${var_logfile}"'
'
apt-get install -y --no-install-recommends --no-install-suggests dropbear-initramfs dropbear-bin 2>&1 | tee -a ${var_logfile}
"
chroot_script "${TARGET}" '
chroot_script "${TARGET}" "
export INITRD=No
apt-get purge -y dropbear dropbear-run || true
echo ExitCode: $? >> '"${var_logfile}"'
'
"
chroot_script "${TARGET}" '
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-recommends --no-install-suggests gpgv 2>&1 | tee -a '"${var_logfile}"'
echo ExitCode: $? >> '"${var_logfile}"'
'
apt-get install -y --no-install-recommends --no-install-suggests gpgv 2>&1 | tee -a ${var_logfile}
"
chroot_script "${TARGET}" '
chroot_script "${TARGET}" "
export INITRD=No
apt-mark hold dropbear dropbear-initramfs 2>&1 | tee -a '"${var_logfile}"'
echo ExitCode: $? >> '"${var_logfile}"'
'
apt-mark hold dropbear dropbear-initramfs 2>&1 | tee -a ${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/"
@@ -59,9 +55,11 @@ dropbear_initramfs() {
for var_file in dbclient dropbearconvert dropbearkey; do
mv "${TARGET}/usr/bin/${var_file}" "${TARGET}/usr/bin/${var_file}.trixie"
install -D -m 0755 -o root -g root "${DIR_TMP}/build/dropbear-2025.88/${var_file}" "${TARGET}/usr/bin/"
do_log "debug" "file_only" "4311() Installation [${var_file}] successful."
done

View File

@@ -39,7 +39,7 @@ guard_sourcing
#######################################
dropbear_setup() {
### Declare Arrays, HashMaps, and Variables.
declare network_static_ipv4ntpserver_0="192.53.103.108" \
declare -r network_static_ipv4ntpserver_0="192.53.103.108" \
var_force_command_string='command="/usr/local/bin/unlock_wrapper.sh",no-agent-forwarding,no-port-forwarding,no-X11-forwarding '
### Prepare strong dropbear host keys.

View File

@@ -32,21 +32,15 @@ update_initramfs() {
chroot_script "${TARGET}" "
update-grub 2>&1 | tee -a ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
chroot_script "${TARGET}" "
depmod -a ${var_kernel} 2>&1 | tee -a ${var_logfile}
update-initramfs -c -v -k all 2>&1 | tee -a ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
chroot_script "${TARGET}" "
update-grub 2>&1 | tee -a ${var_logfile}
RC=( \${PIPESTATUS[@]} )
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
"
chmod 0400 "${TARGET}/boot/grub/grub.cfg"

View File

@@ -39,18 +39,6 @@ installation_ssh() {
mkdir -p "${TARGET}/etc/systemd/system/ssh.service.d"
cat << EOF >| "${TARGET}/etc/systemd/system/ssh.service.d/override.conf"
[Unit]
After=network-online.target
Wants=network-online.target
[Service]
### If anything named 'dropbear' survived, kill it before binding.
ExecStartPre=/usr/bin/pkill -x dropbear || :
Restart=on-failure
RestartSec=3s
EOF
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/banner" "${TARGET}/etc/"
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/motd" "${TARGET}/etc/"
do_log "info" "file_only" "4420() Installed SSH '/etc/banner' and '/etc/motd'."