summaryrefslogtreecommitdiffstats
path: root/server/ipxe/bash_scripts/tpm.sh
diff options
context:
space:
mode:
authorJannik Schönartz2019-02-27 20:19:29 +0100
committerJannik Schönartz2019-02-27 20:19:29 +0100
commitf5a2f0f4a87c845d88380883f8cebe4253b42c11 (patch)
tree1a815b57c2ec92608a1f3b4644f0368ef5a4351c /server/ipxe/bash_scripts/tpm.sh
parentfix major design issue (diff)
downloadbas-f5a2f0f4a87c845d88380883f8cebe4253b42c11.tar.gz
bas-f5a2f0f4a87c845d88380883f8cebe4253b42c11.tar.xz
bas-f5a2f0f4a87c845d88380883f8cebe4253b42c11.zip
[server/ipxe] Fix codemirror only loading on click bug & add the fixes for the tamas demo to the git
Diffstat (limited to 'server/ipxe/bash_scripts/tpm.sh')
-rw-r--r--server/ipxe/bash_scripts/tpm.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/ipxe/bash_scripts/tpm.sh b/server/ipxe/bash_scripts/tpm.sh
index 2b01287..faba4b3 100644
--- a/server/ipxe/bash_scripts/tpm.sh
+++ b/server/ipxe/bash_scripts/tpm.sh
@@ -1,7 +1,8 @@
#!/bin/bash
-
+set -x
+exec &> /log
# Check if the pc has tpm enabled
-if [ -d "/dev/tpm0" ]; then
+if [ -c "/dev/tpm0" ]; then
export TPM_INTERFACE_TYPE=dev
export TPM_DEVICE=/dev/tpm0
mkdir /run/tpm/
@@ -9,5 +10,5 @@ if [ -d "/dev/tpm0" ]; then
openssl rsa -in /run/tpm/$UUID-ssl-private.pem -out /run/tpm/$UUID-ssl-public.pem -outform PEM -pubout
create_tpm2_key -w /run/tpm/$UUID-ssl-private.pem -p 81000001 /run/tpm/$UUID-tpm-private.key
- curl -X PUT -F "tpm=@/run/tpm/$UUID-tpm-private.key" -F "openssl=@/run/tpm/$UUID-ssl-private.pem" --insecure https://$BAS/api/registration/$UUID/files
+ curl -X PUT -F "tpm=@/run/tpm/$UUID-tpm-private.key" -F "openssl=@/run/tpm/$UUID-ssl-public.pem" --insecure https://$BAS/api/registration/$UUID/files
fi