Harden scripts and bump debian-13 ISO to 13.4

This commit is contained in:
2026-05-16 16:42:15 -04:00
parent ac99af8517
commit 2d29791794
6 changed files with 74 additions and 54 deletions
Regular → Executable
+6 -10
View File
@@ -1,16 +1,12 @@
#!/usr/bin/env bash
set -eux
set -x
export DEBIAN_FRONTEND=noninteractive
apt-get clean -y
apt-get autoclean -y
rm -f /var/lib/dhcpcd/*
apt-get clean || exit 1
rm -rf /var/cache/apt/archives/*
rm -rf /var/lib/apt/lists/*
rm -rf /var/tmp/* /var/tmp/.[!.]*
[[ -f /var/log/wtmp ]] && truncate -s 0 /var/log/wtmp
truncate -s 0 /var/log/wtmp
dd if=/dev/zero of=/EMPTY bs=1M || true
sync
rm -rf /EMPTY
dd if=/dev/zero of=/EMPTY bs=1M
sync || exit 1
rm -f /EMPTY || exit 1