#! /bin/sh
#
# Copyright (c) 1998 Florian La Roche
#

PIDFILE=/var/lib/xdm/xdm-pid

case "$1" in
    start)	echo "Starting xdm."
		(sleep 2 && exec /usr/X11R6/bin/xdm) &
		;;
    stop)	if test -f $PIDFILE ; then
			echo "Shutting down xdm."
			killall -TERM -p`cat $PIDFILE` /usr/X11R6/bin/xdm
		fi
		;;
    *)		echo "Usage: $0 {start|stop}"
		exit 1
esac

exit 0
