#!/bin/sh
# Copyright 2011 Paul Parsons
# Distributed under the terms of the GNU General Public License v3 or later

depend="base"
service --depend=${depend} || exit 1

case $1 in
"start")
	daemon --start --label=$0 /usr/bin/Xfbdev \
		-nocursor \
		-dpi 100 \
		-screen 480x640 \
		-mouse tslib,,device=/dev/input/event1 \
		vt1
	while ! test -S /tmp/.X11-unix/X0
	do
		sleep 1
	done
	;;
"stop")
	daemon --stop --label=$0
	;;
esac

exit 0
