#!/bin/sh
# Start or stop xdm.

[ -x /usr/bin/X11/xdm ] || exit 0
[ -f /etc/X11/config -o -f /etc/XF86Config ] || exit 0
PATH=/sbin:/usr/sbin:/bin:/usr/bin
echo $0

case "$1" in
    start)
	start-stop-daemon -S -q -x /usr/bin/X11/xdm
	;;
    stop)
	start-stop-daemon -K -q -x /usr/bin/X11/xdm
	;;
    *)
	echo "Usage: $0 {start|stop}"
	exit 1
	;;
esac
exit 0
