]> git.pld-linux.org Git - packages/gdm2.20.git/blame_incremental - gdm.init
- updated to 2.20.9
[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 start-stop-daemon --start -b --exec /usr/sbin/gdm
30 ok
31 RETVAL=$?
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gdm
33 else
34 msg_already_running "Gnome Display Manager"
35 fi
36 ;;
37 stop)
38 if [ -f /var/lock/subsys/gdm ]; then
39 msg_stopping "Gnome Display Manager"
40 killproc gdm
41 rm -f /var/lock/subsys/gdm
42 else
43 msg_not_running "Gnome Display Manager"
44 fi
45 ;;
46 status)
47 status gdm gdm-binary
48 exit $?
49 ;;
50 restart|force-reload)
51 $0 stop
52 $0 start
53 exit $?
54 ;;
55 *)
56 msg_usage "$0 {start|stop|restart|force-reload|status}"
57 exit 3
58esac
59
60exit $RETVAL
This page took 0.065436 seconds and 4 git commands to generate.