]>
Commit | Line | Data |
---|---|---|
87fba97e | 1 | #!/bin/sh |
2 | # | |
3 | # gdm: Starts the Gnome Display Manager | |
4 | # | |
5 | # Version: @(#) /etc/rc.d/init.d/gdm 0.1 | |
6 | # | |
7 | # chkconfig: 5 95 5 | |
8 | # description: Starts and stops the Gnome Display Manager at startup and | |
9 | # shutdown.. | |
10 | # | |
11 | # config: /etc/X11/gdm/gdm-config | |
12 | # probe: true | |
13 | # hide: true | |
14 | ||
15 | . /etc/rc.d/init.d/functions | |
16 | ||
17 | # Get service config | |
18 | if [ -f /etc/sysconfig/gdm ] ; then | |
19 | . /etc/sysconfig/gdm | |
20 | fi | |
21 | ||
22 | # See how we were called. | |
23 | case "$1" in | |
24 | start) | |
25 | # Check if the service is already running? | |
26 | if [ ! -f /var/lock/subsys/gdm ]; then | |
27 | msg_starting "Gnome Display Manager" | |
28 | daemon /usr/X11R6/bin/gdm | |
29 | touch /var/lock/subsys/gdm | |
30 | else | |
31 | msg_Already_Running "Gnome Display Manager" | |
32 | fi | |
33 | ;; | |
34 | stop) | |
35 | msg_stopping "Gnome Display Manager" | |
36 | killproc gdm | |
37 | rm -f /var/lock/subsys/gdm | |
38 | ;; | |
39 | status) | |
40 | status gdm | |
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 |