[Toybox] Poking at last.c a bit more...

Rob Landley rob at landley.net
Mon May 12 04:44:19 PDT 2014


Looking at last.c, it's got support for printing out shutdown and reboot
time, but I can't find anything writing shutdown or reboot records into
the log. For that matter, switching RUN_LVL and data switching OLD_TIME
and NEW_TIME aren't logged by the current toybox tools either.

I see getty.c writing LOGIN records into utmp (which is odd because it
doesn't know if anybody successfully logged in, just that it brought up
a tty?), and I see telnetd writing records (I'd think sshd would be more
widely used these days?). And a comment in login.c that it _doesn't_
mess with utmp...

This makes it slightly tricky to set up a test environment for last, if
nothing is actually creating a test log for last to display.

Meanwhile, "w", "uptime", and "who" are using the new utmpx stuff. I
need to work out the difference between "w", "who", and "last". They
seem kind of similar to me, but I haven't personally used any of them
much since about 1995...

Rob

 1399895059.0


More information about the Toybox mailing list