G. Pape
runit

runit - the utmpset program


Ordinary init processes handle utmp file records for local login accounting. The runit program doesn't include code to update the utmp file, the getty processes are handled the same as all other services. So normally on systems running with runit local login accounting doesn't work as expected: The utmp file is not updated after a user logs out.

This can be done by the utmpset program.

To compile the utmpset program change to the runit package's source directory:

  # cd /package/admin/runit/src
The utmpset program cannot be used with the diet libc since it needs to be linked against libutil. Change conf-cc and conf-ld if necessary.

Then build and install the utmpset program:

  # make utmpset
  # install -m0755 utmpset ../command/utmpset
For each getty service, add a line to the corresponding run script like this:
  #!/bin/sh
  /package/admin/runit/command/utmpset tty5
  exec /sbin/getty 38400 tty5 linux
This will cause the utmp record for line tty5 to be cleared before the getty is started; login accounting works as expected for this line.
Gerrit Pape <pape@smarden.org>
$Id: utmpset.html,v 1.1 2002/05/19 11:10:43 pape Exp $