]>
Commit | Line | Data |
---|---|---|
708ea193 | 1 | #!/bin/sh |
2 | # | |
3 | # gdm: Starts the Gnome Display Manager | |
4 | # | |
2c37b1f4 | 5 | # Version: @(#) /etc/rc.d/init.d/gdm 0.1 |
708ea193 | 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 | |
2c37b1f4 | 19 | . /etc/sysconfig/gdm |
708ea193 | 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 |
2c37b1f4 | 32 | msg_already_running "Gnome Display Manager" |
33 | exit 1 | |
708ea193 | 34 | fi |
35 | ;; | |
36 | stop) | |
eb18af7f | 37 | if [ -f /var/lock/subsys/gdm ]; then |
38 | msg_stopping "Gnome Display Manager" | |
39 | killproc gdm | |
40 | rm -f /var/lock/subsys/gdm | |
41 | else | |
2c37b1f4 | 42 | msg_not_running "Gnome Display Manager" |
43 | exit 1 | |
eb18af7f | 44 | fi |
708ea193 | 45 | ;; |
46 | status) | |
47 | status gdm | |
48 | ;; | |
49 | restart|reload) | |
50 | $0 stop | |
51 | $0 start | |
52 | ;; | |
53 | *) | |
2c37b1f4 | 54 | msg_usage "$0 {start|stop|restart|reload|status}" |
708ea193 | 55 | exit 1 |
56 | esac | |
57 | ||
eb18af7f | 58 | exit $RETVAL |