From 11a5b122c82215bf524f8a94aac1d68a1d56cbed Mon Sep 17 00:00:00 2001 From: ghe0 Date: Sun, 10 Nov 2024 04:19:47 +0200 Subject: [PATCH] modprobe after you wait a bit --- init.sh | 4 ++++ init_functions.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 0cae69b..cc33601 100755 --- a/init.sh +++ b/init.sh @@ -11,6 +11,10 @@ load_modules create_certs setup_network +# if you wait a bit, it works. The Kernel works in mysterious ways. +sleep 5 +modprobe sev_guest + guest_api || echo DeTEE API got killed by the user. if [[ -f "$INSTALL_URL" ]]; then diff --git a/init_functions.sh b/init_functions.sh index cff1720..587bbe2 100644 --- a/init_functions.sh +++ b/init_functions.sh @@ -120,7 +120,7 @@ detee_ssh_key() { grep -F "$( echo $key | awk '{ print $2 }' )" authorized_keys || { echo "$key" >> authorized_keys } - done < /tmp/detee_ssh_key + done < "$SSH_KEY_FILE" chmod 600 authorized_keys }