]> git.pld-linux.org Git - packages/gdm2.20.git/blob - gdm.init
- support _libexecdir; release 12
[packages/gdm2.20.git] / gdm.init
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 05
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 GDM_VT=vt9
18
19 # Get service config
20 if [ -f /etc/sysconfig/gdm ]; then
21         . /etc/sysconfig/gdm
22 fi
23
24 RETVAL=0
25 # See how we were called.
26 case "$1" in
27   start)
28         # Check if the service is already running?
29         if [ ! -f /var/lock/subsys/gdm ]; then
30                 msg_starting "Gnome Display Manager"
31                 start-stop-daemon --start -b --exec /usr/sbin/gdm ${GDM_VT}
32                 ok
33                 RETVAL=$?
34                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gdm
35         else
36                 msg_already_running "Gnome Display Manager"
37         fi
38         ;;
39   stop)
40         if [ -f /var/lock/subsys/gdm ]; then
41                 msg_stopping "Gnome Display Manager"
42                 killproc gdm
43                 rm -f /var/lock/subsys/gdm
44         else
45                 msg_not_running "Gnome Display Manager"
46         fi
47         ;;
48   status)
49         status gdm gdm-binary
50         exit $?
51         ;;
52   restart|force-reload)
53         $0 stop
54         $0 start
55         exit $?
56         ;;
57   *)
58         msg_usage "$0 {start|stop|restart|force-reload|status}"
59         exit 3
60 esac
61
62 exit $RETVAL
This page took 0.054894 seconds and 3 git commands to generate.