#!/bin/sh
# Bring up the x230's NIC, get a DHCP address and invoke keylime

insmod /lib/modules/e1000e.ko
udhcpc -n

cd /
wget-measure.sh 6 http://192.168.1.5/keylime.tar.gz
tar xf keylime.tar.gz

if [ ! -x /keylime-node ]; then
	echo '!!!! Keylime overlay not found?'
	tpm extend -ix 4 -ic "recovery"
	exec /bin/ash
fi

exec /keylime-node
