]>
Commit | Line | Data |
---|---|---|
9fb0fa33 | 1 | #!/bin/sh |
da301058 | 2 | # |
3 | # /etc/rc.d/init.d/utmpd | |
4 | # | |
5 | # Starts the utmpd daemon | |
6 | # | |
f798dcab | 7 | # chkconfig: 2345 25 55 |
da301058 | 8 | # description: Utmpd daemon |
9 | # processname: utmpd | |
10 | # | |
da301058 | 11 | # Source function library. |
12 | . /etc/rc.d/init.d/functions | |
13 | ||
14 | # See how we were called. | |
15 | # | |
16 | case "$1" in | |
17 | start) | |
18 | show Starting utmpd daemon | |
19 | # Clean up /var/run and create /var/run/utmp so that we can login. | |
20 | #( cd /var/run && find . ! -type d -exec rm -f -- {} \; ) | |
21 | : > /var/run/utmpx | |
22 | : > /var/run/utmp | |
23 | if [ ! -f /var/log/wtmpx ]; then | |
24 | : > /var/log/wtmpx | |
25 | fi | |
26 | daemon utmpd | |
27 | touch /var/lock/subsys/utmpd | |
28 | ;; | |
29 | stop) | |
30 | show Stopping utmpd daemon | |
31 | killproc utmpd | |
32 | rm -f /var/lock/subsys/utmpd | |
33 | ;; | |
34 | reload|restart) | |
35 | $0 stop | |
36 | $0 start | |
37 | ;; | |
38 | status) | |
39 | status utmpd | |
40 | ;; | |
41 | *) | |
42 | echo "Usage: $0 {start|stop|restart|reload|status}" | |
43 | exit 1 | |
44 | esac | |
45 | ||
46 | exit 0 |