#!/bin/bash source /init_functions.sh export INSTALL_URL="/tmp/detee_install_url" export INSTALL_SHA="/tmp/detee_install_sha" export ROOT_KEYFILE="/tmp/detee_root_keyfile" export SSH_KEY_FILE="/tmp/detee_ssh_key" create_mounts 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 install_os else mount_root fi # TODO: take into consideration to remove github key injection github_ssh_key detee_ssh_key exec switch_root /mnt /sbin/init "$@"