#!/bin/sh
# Prepare /etc/inittab for running oem-config at the next boot, and start
# the OEM test mode.
set -e

. /usr/share/debconf/confmodule

update-rc.d oem-config start 12 2 3 4 5 .

if type hwdb-gui >/dev/null 2>&1; then
	db_input high oem-config/run-test || [ $? -eq 30 ]
	db_go
	db_get oem-config/run-test
	if [ "$RET" = true ]; then
		/usr/sbin/oem-config-test
	fi
fi

exit 0
