From d14e4082989a3d7422232d2102e0f9055d8393a4 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Tue, 1 Oct 2024 15:41:14 +0100 Subject: [PATCH] Make sure sign boot is single-instance. --- local-sbin/sign-boot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/local-sbin/sign-boot b/local-sbin/sign-boot index 6e6f75c..c027e8f 100755 --- a/local-sbin/sign-boot +++ b/local-sbin/sign-boot @@ -1,4 +1,8 @@ #!/bin/bash +if [ -f /run/signing ]; then + echo "[-] Signing already in progress!"; +fi; +/usr/bin/touch /run/signing; echo "[*] Preparing to sign!"; #touch /dev/shm/sb-passpwd.txt; #chown root:root /dev/shm/sb-passpwd.txt; @@ -38,4 +42,5 @@ do /usr/bin/gpg --batch --detach-sign $i; done; #shred /dev/shm/sb-passpwd.txt; +/usr/bin/rm -f /run/signing; echo "[*] Signing Complete!";