]>
Commit | Line | Data |
---|---|---|
708ea193 | 1 | #!/bin/sh |
2 | # | |
3 | # gdm: Starts the Gnome Display Manager | |
4 | # | |
5 | # Version: @(#) /etc/rc.d/init.d/gdm 0.1 | |
6 | # | |
5ace6f10 | 7 | # chkconfig: 5 95 5 |
708ea193 | 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" | |
f19432c7 | 28 | daemon open /usr/bin/gdm |
eb18af7f | 29 | RETVAL=$? |
554969be | 30 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gdm |
708ea193 | 31 | else |
32 | msg_Already_Running "Gnome Display Manager" | |
33 | fi | |
34 | ;; | |
35 | stop) | |
eb18af7f | 36 | if [ -f /var/lock/subsys/gdm ]; then |
37 | msg_stopping "Gnome Display Manager" | |
38 | killproc gdm | |
39 | rm -f /var/lock/subsys/gdm | |
40 | else | |
41 | msg_Not_Running "Gnome Display Manager" | |
42 | fi | |
708ea193 | 43 | ;; |
44 | status) | |
45 | status gdm | |
46 | ;; | |
47 | restart|reload) | |
48 | $0 stop | |
49 | $0 start | |
50 | ;; | |
51 | *) | |
52 | echo "Usage: $0 {start|stop|status|restart|reload}" | |
53 | exit 1 | |
54 | esac | |
55 | ||
eb18af7f | 56 | exit $RETVAL |