From be60c1fb463a222d9e69f2b7723bcfd059273eb6 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 3 Oct 2025 00:20:45 +0200 Subject: [PATCH 1/2] fix: Always remove PID file --- src/boot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/boot.sh b/src/boot.sh index ccb56325..3aea8938 100644 --- a/src/boot.sh +++ b/src/boot.sh @@ -135,9 +135,9 @@ if [ -s "$PS" ] && [ -r "$PS" ]; then fi -if [[ "$TPM" == [Yy1]* ]]; then +rm -f /var/run/tpm.pid - rm -f /var/run/tpm.pid +if [[ "$TPM" == [Yy1]* ]]; then if ! swtpm socket -t -d --tpmstate "backend-uri=file://$STORAGE/${BOOT_MODE,,}.tpm" --ctrl type=unixio,path=/run/swtpm-sock --pid file=/var/run/tpm.pid --tpm2; then error "Failed to start TPM emulator, reason: $?" From d104cbf2d5731f8333e55064ca6d52d3724e663d Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 3 Oct 2025 00:23:26 +0200 Subject: [PATCH 2/2] feat: Always remove PID Added cleanup step to remove old dnsmasq PID file. --- src/network.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/network.sh b/src/network.sh index b7e7e005..eb1f05fc 100644 --- a/src/network.sh +++ b/src/network.sh @@ -524,6 +524,9 @@ if [[ "$DEBUG" == [Yy1]* ]]; then echo fi +# Clean up old files +rm -f /var/run/dnsmasq.pid + if [[ -d "/sys/class/net/$VM_NET_TAP" ]]; then info "Lingering interface will be removed..." ip link delete "$VM_NET_TAP" || true