]> git.pld-linux.org Git - packages/glibc.git/blob - utmpd.init
- gcc 3.4 patch removed.
[packages/glibc.git] / utmpd.init
1 #!/bin/sh
2 #
3 #       /etc/rc.d/init.d/utmpd
4 #
5 # utmp          Starts the utmpd daemon
6 #
7 # chkconfig:    2345 25 55
8 # description:  Utmpd daemon
9 # processname:  utmpd
10 #
11
12 # Source function library.
13 . /etc/rc.d/init.d/functions
14
15 # Get service config - may override defaults
16 [ -f /etc/sysconfig/utmpd ] && . /etc/sysconfig/utmpd
17
18 RETVAL=0
19 # See how we were called.
20 case "$1" in
21   start)
22         # Check if the service is already running?
23         if [ ! -f /var/lock/subsys/utmpd ]; then
24                 msg_starting "utmpd"
25                 daemon utmpd
26                 RETVAL=$?
27                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/utmpd
28         else
29                 msg_already_running "utmpd"
30         fi
31         ;;
32   stop)
33         if [ -f /var/lock/subsys/utmpd ]; then
34                 msg_stopping "utmpd"
35                 killproc utmpd
36                 rm -f /var/lock/subsys/utmpd >/dev/null 2>&1
37         else
38                 msg_not_running "utmpd"
39         fi      
40         ;;
41   restart|force-reload)
42         $0 stop
43         $0 start
44         exit $?
45         ;;
46   status)
47         status utmpd
48         exit $?
49         ;;
50   *)
51         msg_usage "$0 {start|stop|restart|force-reload|status}"
52         exit 3
53 esac
54
55 exit $RETVAL
This page took 0.030092 seconds and 3 git commands to generate.