Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Adds prelude function.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbdatko committed Sep 16, 2014
1 parent c8b9884 commit 02dde44
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tpm_clear_own.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ if [[ crypto_cape_attached_p -ne 0 ]]; then
exit 1
fi

part1(){
prelude(){
apt-get install -y git trousers tpm-tools libtspi1 libtspi-dev build-essential
git clone https://github.com/cryptotronix/cryptocape-init.git
cryptocape-init/"basename $0"
}

part1(){


gcc tpm_assert/tpm_assertpp.c -o tpm_assertpp

Expand Down Expand Up @@ -100,6 +106,7 @@ part2(){
echo "Command failed."
echo "$OWN_RESULT" | grep "Internal software error"
if [[ "$?" == 0 ]]; then
echo "Internal Software Error: halting. Remove and re-apply power and try again."
halt
fi

Expand All @@ -110,6 +117,10 @@ part2(){

## main

if [[ "$1" == "prelude" ]]; then
prelude
fi

print_tpm_status

if [[ $TPM_ACTIVE == "1" ]] &&
Expand Down

0 comments on commit 02dde44

Please sign in to comment.