Unverified Commit 72e404c6 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Always remove PID file (#861)

parent 5f562718
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -135,10 +135,10 @@ if [ -s "$PS" ] && [ -r "$PS" ]; then

fi

if [[ "$TPM" == [Yy1]* ]]; then

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: $?"
  else
+3 −0
Original line number Diff line number Diff line
@@ -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