1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
.TH utmpset 8
.SH NAME
utmpset \- logout a line from utmp and wtmp file
.SH SYNOPSIS
.B utmpset
[
.B \-w
]
.I line
.SH DESCRIPTION
The
.B utmpset
program modifies the user accounting database
.BR utmp (5)
and optionally
.BR wtmp (5)
to indicate that the user on the terminal
.I line
has logged out.
.P
Ordinary
.BR init (8)
processes handle utmp file records for local login accounting. The
.BR runit (8)
program doesn't include code to update the utmp file, the
.BR getty (8)
processes are handled the same as all other services.
.P
To enable local login accounting, add
.B utmpset
to the
.BR getty (8)
.I finish
scripts, e.g.:
.P
$ cat /var/service/getty-5/finish
#!/bin/sh
exec utmpset \-w tty5
$
.SH OPTIONS
.TP
.B \-w
wtmp. Additionally to the utmp file, write an empty record for
.I line
to the wtmp file.
.SH EXIT CODES
.B utmpset
returns 111 on error, 1 on wrong usage, 0 in all other cases.
.SH SEE ALSO
runsv(8),
runsvctrl(8),
runsvstat(8),
runsvdir(8),
runsvchdir(8),
runit(8),
runit-init(8),
getty(8)
.P
http://smarden.org/runit/
.SH AUTHOR
Gerrit Pape <pape@smarden.org>
|