]> git.pld-linux.org Git - packages/gdm2.20.git/blame - gdm.init
- updated
[packages/gdm2.20.git] / gdm.init
CommitLineData
87fba97e 1#!/bin/sh
2#
3# gdm: Starts the Gnome Display Manager
4#
958117c3 5# Version: @(#) /etc/rc.d/init.d/gdm 0.1
87fba97e 6#
9483f328 7# chkconfig: 5 95 5
87fba97e 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
18if [ -f /etc/sysconfig/gdm ] ; then
958117c3 19 . /etc/sysconfig/gdm
87fba97e 20fi
21
22# See how we were called.
23case "$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"
a7d0008b 28 daemon open /usr/bin/gdm
78b1130f 29 RETVAL=$?
401219bc 30 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gdm
87fba97e 31 else
958117c3 32 msg_already_running "Gnome Display Manager"
33 exit 1
87fba97e 34 fi
35 ;;
36 stop)
78b1130f 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
958117c3 42 msg_not_running "Gnome Display Manager"
43 exit 1
78b1130f 44 fi
87fba97e 45 ;;
46 status)
47 status gdm
48 ;;
49 restart|reload)
50 $0 stop
51 $0 start
52 ;;
53 *)
958117c3 54 msg_usage "$0 {start|stop|restart|reload|status}"
87fba97e 55 exit 1
56esac
57
78b1130f 58exit $RETVAL
This page took 0.029319 seconds and 4 git commands to generate.