]> git.pld-linux.org Git - packages/gdm2.20.git/blame - gdm.init
- support _libexecdir; release 12
[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#
1339eaec 7# chkconfig: 5 95 05
4c996915 8# description: Starts and stops the Gnome Display Manager at startup and \
87fba97e 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
2835d411
JR
17GDM_VT=vt9
18
87fba97e 19# Get service config
1d2b4321 20if [ -f /etc/sysconfig/gdm ]; then
958117c3 21 . /etc/sysconfig/gdm
87fba97e 22fi
23
c77044f0 24RETVAL=0
87fba97e 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"
2835d411 31 start-stop-daemon --start -b --exec /usr/sbin/gdm ${GDM_VT}
41f42dd8 32 ok
78b1130f 33 RETVAL=$?
401219bc 34 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gdm
87fba97e 35 else
958117c3 36 msg_already_running "Gnome Display Manager"
87fba97e 37 fi
38 ;;
39 stop)
78b1130f 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
958117c3 45 msg_not_running "Gnome Display Manager"
78b1130f 46 fi
87fba97e 47 ;;
48 status)
4dcf29a7 49 status gdm gdm-binary
c77044f0 50 exit $?
87fba97e 51 ;;
c77044f0 52 restart|force-reload)
87fba97e 53 $0 stop
54 $0 start
c77044f0 55 exit $?
87fba97e 56 ;;
57 *)
c77044f0 58 msg_usage "$0 {start|stop|restart|force-reload|status}"
59 exit 3
87fba97e 60esac
61
78b1130f 62exit $RETVAL
This page took 0.04396 seconds and 4 git commands to generate.