#!/bin/sh

set -e

PXE_SERVER_IP=$(cat /etc/oci/pxe-server-ip)

# Best effort: make sure the machine will boot on its HDD after reboot,
# even if its UEFI BootOrder says otherwise.
oci-uefi-boot-order hdd || true

curl http://${PXE_SERVER_IP}/oci/install-status.php?status=firstboot
