Justfile: add logic to unlock remote drive

This commit is contained in:
steveej 2018-12-12 11:02:46 +01:00
parent 9691326c02
commit cb3956c55a

View file

@ -120,9 +120,12 @@ verify-vnc sshserver attempts="10":
for i in `seq 1 {{attempts}}`; do for i in `seq 1 {{attempts}}`; do
if send_and_compare; then if send_and_compare; then
echo Verification succeeded at attempt $i. Unlocking remote drive... echo Verification succeeded at attempt $i. Unlocking remote drive...
# TODO: unlock drive 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 exit 0
fi fi
echo Unlock failed...
fi
done done
echo Verification failed {{attempts}} times. Giving up... echo Verification failed {{attempts}} times. Giving up...
exit 1 exit 1