Sophie

Sophie

distrib > Mandriva > 9.1 > i586 > by-pkgid > 8c6202abd5c23d52fed280e28dc23b0a > files > 28

initscripts-7.06-12.3.91mdk.i586.rpm

#!/bin/sh
#---------------------------------------------------------------
# Project         : Mandrake Linux
# Module          : initscripts
# File            : dm
# Version         : $Id: dm,v 1.3 2002/09/02 19:29:42 flepied Exp $
# Author          : Frederic Lepied
# Created On      : Wed May 29 22:10:40 2002
#---------------------------------------------------------------
# chkconfig: 5 30 09
# description: This startup script launches the graphical display manager.
#---------------------------------------------------------------

# Source function library.
. /etc/rc.d/init.d/functions

ret=0

case $1 in 
    start)
	gprintf "Starting display manager: "
	/etc/X11/prefdm &
	success "Display manager startup"
	ret=$?
	echo
	if [ $ret = 0 ]; then
	    touch /var/lock/subsys/dm
	fi
	;;

    stop)
	gprintf "Stopping display manager: "
	if [ -r /var/lock/subsys/dm ]; then
	    kill `cat /var/lock/subsys/dm` > /dev/null 2>&1
	fi
	ret=$?
	echo
	if [ $ret = 0 ]; then
	    success "Display manager shutdown"
	    rm -f /var/lock/subsys/dm
	else
	    failure "Display manager shutdown"
	fi
	;;

    status)
	status dm
	;;

    reload)
	;;

    restart)
	$0 stop
	$0 start
	ret=$?
	;;
    *)
	gprintf "Usage: %s\n" "$(basename $0) {start|stop|restart|status}"
	exit 0
	;;
esac

exit $ret

# dm ends here