From cb3956c55a981fed358a439ca2bd8c02a731d751 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Wed, 12 Dec 2018 11:02:46 +0100 Subject: [PATCH] Justfile: add logic to unlock remote drive --- Justfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Justfile b/Justfile index d2f73e1..e2bf4ab 100755 --- a/Justfile +++ b/Justfile @@ -120,8 +120,11 @@ verify-vnc sshserver attempts="10": for i in `seq 1 {{attempts}}`; do if send_and_compare; then echo Verification succeeded at attempt $i. Unlocking remote drive... - # TODO: unlock drive - exit 0 + if $GETPWD | head -n1 | ssh -4 ${SSHOPTS} root@{{sshserver}} "cryptsetup-askpass && exit 0" 1>/dev/null 2>&1 > /dev/null; then + echo Unlock successful! + exit 0 + fi + echo Unlock failed... fi done echo Verification failed {{attempts}} times. Giving up...