mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-24 07:06:42 +00:00
40c34453df
Exception: scripts sourcing/calls within etc/ash_functions continues to use old TRACE functions until we switch to bash completely getting rid of ash. This would mean getting rid of legacy boards (flash + legacy boards which do not have enough space for bash in flash boards) once and for all. Signed-off-by: Thierry Laurion <insurgo@riseup.net>
25 lines
352 B
Bash
Executable File
25 lines
352 B
Bash
Executable File
#!/bin/bash
|
|
# get a file and extend a TPM PCR
|
|
. /etc/functions
|
|
|
|
die() {
|
|
TRACE_FUNC
|
|
echo >&2 "$@"
|
|
exit 1
|
|
}
|
|
|
|
INDEX="$1"
|
|
URL="$2"
|
|
|
|
if [ -z "$INDEX" -o -z "$URL" ]; then
|
|
die "Usage: $0 pcr-index url"
|
|
fi
|
|
|
|
|
|
wget "$URL" || die "$URL: failed"
|
|
|
|
FILE="`basename "$URL"`"
|
|
tpmr extend -ix "$INDEX" -if "$FILE" || die "$FILE: tpm extend failed"
|
|
|
|
|