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