]> git.pld-linux.org Git - packages/gdm.git/blame - gdm.init
- 2.16.5
[packages/gdm.git] / gdm.init
CommitLineData
708ea193 1#!/bin/sh
2#
3# gdm: Starts the Gnome Display Manager
4#
2c37b1f4 5# Version: @(#) /etc/rc.d/init.d/gdm 0.1
708ea193 6#
c40589db 7# chkconfig: 5 95 05
3f1ed04c 8# description: Starts and stops the Gnome Display Manager at startup and \
708ea193 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
f7def4df 18if [ -f /etc/sysconfig/gdm ]; then
2c37b1f4 19 . /etc/sysconfig/gdm
708ea193 20fi
21
4a7750aa 22RETVAL=0
708ea193 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"
04ad4d3f 29 daemon /usr/sbin/gdm
eb18af7f 30 RETVAL=$?
554969be 31 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gdm
708ea193 32 else
2c37b1f4 33 msg_already_running "Gnome Display Manager"
708ea193 34 fi
35 ;;
36 stop)
eb18af7f 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
2c37b1f4 42 msg_not_running "Gnome Display Manager"
eb18af7f 43 fi
708ea193 44 ;;
45 status)
05e2df46 46 status gdm gdm-binary
4a7750aa 47 exit $?
708ea193 48 ;;
4a7750aa 49 restart|force-reload)
708ea193 50 $0 stop
51 $0 start
4a7750aa 52 exit $?
708ea193 53 ;;
54 *)
4a7750aa 55 msg_usage "$0 {start|stop|restart|force-reload|status}"
56 exit 3
708ea193 57esac
58
eb18af7f 59exit $RETVAL
This page took 0.045447 seconds and 4 git commands to generate.