#!/bin/sh

set -e

PXE_SERVER_IP=$(cat /etc/oci/pxe-server-ip)
MY_IP=$(cat /etc/oci/my-ip)
SYSTEM_SERIAL=$(oci-system-serial)

oci-wait-for-networking

curl "http://${PXE_SERVER_IP}/oci/install-status.php?status=installed&chassis-serial=${SYSTEM_SERIAL}&ipaddr=${MY_IP}"
