heads/initrd/bin/usb-init

21 lines
370 B
Plaintext
Raw Normal View History

#!/bin/sh
# Boot a USB installation
. /etc/functions
. /etc/config
# Confirm we have a good TOTP unseal
if ! confirm_totp ; then
recovery 'Failed to unseal TOTP'
fi
# Extend PCR4 as soon as possible
tpm extend -ix 4 -ic usb
if [ ! "$totp_confirm" = "y" ]; then
recovery "Failed to confirm validity of TOTP"
fi
usb-scan
recovery "Something failed during USB boot"