aboutsummaryrefslogtreecommitdiffstats
path: root/mandriva/dm
blob: 99306c6b56cade0489321a4b2ed31fc52012494e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/sh
#---------------------------------------------------------------
# Project         : Mageia
# Module          : initscripts
# File            : dm
# Version         : $Id$
# Author          : Frederic Lepied
# Created On      : Wed May 29 22:10:40 2002
#---------------------------------------------------------------
# chkconfig: 57 30 09
# description: This startup script launches the graphical display manager.
#---------------------------------------------------------------
#
### BEGIN INIT INFO
# Provides: dm
# Should-Start: network-auth acpid lircmd xfs haldaemon
# Default-Start: 5 7
# Short-Description: Launches the graphical display manager
# Description: This startup script launches the graphical display manager.
### END INIT INFO

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

ret=0

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

    stop)
	gprintf "Stopping display manager: "
	killproc dm
	ret=$?
	if [ $ret = 0 ]; then
	    success "Display manager shutdown"
	    rm -f /var/lock/subsys/dm
	else
	    failure "Display manager shutdown"
	fi
	echo
	;;

    status)
	status dm
	;;

    reload)
	;;

    restart)
	$0 stop
	# give a chance to the X server to stop gracefully
	sleep 5
	$0 start
	ret=$?
	;;
    *)
	gprintf "Usage: %s\n" "$(basename $0) {start|stop|restart|status}"
	exit 0
	;;
esac

exit $ret

# dm ends here