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