From a07bec04726937feae2035c2303038e956e8c4c0 Mon Sep 17 00:00:00 2001 From: ahtlon Date: Fri, 24 Jan 2025 18:42:31 +0100 Subject: [PATCH] [scripts] only need to unlock once --- scripts/unlock-boot.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/unlock-boot.sh b/scripts/unlock-boot.sh index 2c5cea3..347f260 100644 --- a/scripts/unlock-boot.sh +++ b/scripts/unlock-boot.sh @@ -23,18 +23,14 @@ echo if [ $# = 1 ] then diskkey=$(sops -d machines/$HOSTNAME/disk.key) - echo "$diskkey" | ssh $sshoptions root@$HOSTNAME-initrd "systemd-tty-ask-password-agent" #storage - echo "$diskkey" | ssh $sshoptions root@$HOSTNAME-initrd "systemd-tty-ask-password-agent" #root elif [ $# = 2 ] then diskkey=$(sops -d machines/$HOSTNAME/disk.key) IP=$2 - echo "$diskkey" | ssh $sshoptions root@$IP "systemd-tty-ask-password-agent" #storage - echo "$diskkey" | ssh $sshoptions root@$IP "systemd-tty-ask-password-agent" #root - + else echo echo "Unlock the root disk on a remote host."