#!/bin/sh
# Begin $rc_base/init.d/xdm

# $Id: kdm,v 1.4 2008/01/20 22:50:09 install Exp install $

. /etc/sysconfig/rc
. $rc_functions
pidfile=/var/run/kdm.pid
case "$1" in
	start)
		boot_mesg "Starting KDM"
		export HOME=/root
		cd $HOME
		/opt/kde/bin/kdm
		;;
	stop)
		boot_mesg "Stopping KDM"
                if [ -f $pidfile ]; then
                        kill `cat $pidfile`
                        rm $pidfile
                fi
		;;
	restart)
		$0 stop
		$0 start
		;;
	*)
		echo "Usage: $0 start|stop|restart"
		;;
esac

# End of file