]> git.pld-linux.org Git - packages/gdm2.20.git/blame_incremental - gdm.init
- rel 4
[packages/gdm2.20.git] / gdm.init
... / ...
CommitLineData
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
17GDM_VT=vt9
18
19# Get service config
20if [ -f /etc/sysconfig/gdm ]; then
21 . /etc/sysconfig/gdm
22fi
23
24RETVAL=0
25# See how we were called.
26case "$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
60esac
61
62exit $RETVAL
This page took 0.027844 seconds and 4 git commands to generate.