]>
Commit | Line | Data |
---|---|---|
5e2a6703 | 1 | #!/bin/sh |
2 | # | |
3 | # xdm: Starts the X Display Manager | |
4 | # | |
5 | # Version: @(#) /etc/rc.d/init.d/xdm 1.3 | |
6 | # | |
7 | # chkconfig: 5 95 5 | |
8 | # description: Starts and stops the X Display Manager at startup and | |
9 | # shutdown. can run one of several display managers; gdm, kdm, | |
10 | # or xdm, in that order of preferential treatment. | |
11 | # | |
12 | # config: /etc/X11/xdm/xdm-config | |
13 | # probe: true | |
14 | # hide: true | |
15 | ||
16 | . /etc/rc.d/init.d/functions | |
17 | ||
bb6a1b62 | 18 | # Get service config |
19 | if [ -f /etc/sysconfig/xdm ] ; then | |
20 | . /etc/sysconfig/xdm | |
21 | fi | |
22 | ||
5e2a6703 | 23 | # See how we were called. |
24 | case "$1" in | |
25 | # Check if the service is already running? | |
26 | if [ ! -f /var/lock/subsys/xdm ]; then | |
27 | show Starting X Display Manager daemon | |
28 | daemon /usr/X11R6/bin/xdm | |
29 | else | |
30 | echo "Starting X Display Manager already is running" | |
31 | fi | |
32 | touch /var/lock/subsys/xdm | |
33 | ;; | |
34 | stop) | |
bb6a1b62 | 35 | show Stopping X Display Manager daemon |
5e2a6703 | 36 | killproc xdm |
37 | rm -f /var/lock/subsys/xdm | |
38 | ;; | |
39 | status) | |
40 | status xdm | |
41 | ;; | |
42 | restart|reload) | |
43 | $0 stop | |
44 | $0 start | |
45 | ;; | |
46 | *) | |
47 | echo "Usage: $0 {start|stop|status|restart|reload}" | |
48 | exit 1 | |
49 | esac | |
50 | ||
51 | exit 0 |