#! /bin/sh
# Run on the first boot after shipping to the end user to reconfigure the
# system for them; removes itself thereafter.
set -e

PATH="/usr/local/sbin:/usr/sbin:/sbin${PATH:+:$PATH}"

if ! type oem-config-firstboot >/dev/null 2>&1; then
	exit 0
fi

case $1 in
	start)
		# Make the splash screen go away if necessary.
		DO_NOT_SWITCH_VT=yes /etc/init.d/usplash start || true

		# Reconfigure the system (starts a temporary display
		# manager).
		oem-config-firstboot </dev/console >/dev/console 2>&1
		;;
esac

exit 0
