#!/bin/sh
### BEGIN INIT INFO
# Provides:          oobe
# Should-Start:      console-screen kbd acpid dbus hal consolekit
# Required-Start:    $local_fs $remote_fs x11-common
# Required-Stop:     $local_fs $remote_fs
# X-Start-Before:    lightdm slim slimski sddm
# Default-Start:     5
# Default-Stop:      0 1 6
# Short-Description: OOBE
# Description:       Debian init script for the Out-of-Box Experience
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

#don't start on rpi first boot
FILE="/etc/rpi_skip_first_boot"
if [ -e "$FILE" ]; then
	rm "$FILE"
	exit 0
fi
	


case "$1" in
  start)
	# Boot will hold here since the process is not being forked.
	echo "Loading Out-of-Box Experience..."
	startx /usr/bin/oobe.sh 2>/dev/null
	# Boot will continue after the OOBE application and X exits.
	;;
esac
exit 0
