[systemd-devel] [PATCH] correctly mark system reboot
lennart at poettering.net
Thu Mar 3 07:21:26 PST 2011
On Thu, 03.03.11 07:51, Andrey Borzenkov (arvidjaar at gmail.com) wrote:
> On Thu, Mar 3, 2011 at 12:31 AM, Lennart Poettering
> <lennart at poettering.net> wrote:
> > On Wed, 02.03.11 11:41, Andrey Borzenkov (arvidjaar at gmail.com) wrote:
> >> It is expected that system will put "reboot" in wtmp to mark
> >> when it starts coming up. This is looked for by "who -b" and is
> >> used by "last" to calculate correct time spent by various programs.
> >> Add systemd-update-utmp-reboot.service which is started as soon
> >> as possible after local-fs.target to mark reboot.
> > Hmm, systemd-update-utmp-runlevel.service should normally do that
> > implicitly. When /lib/systemd/systemd-update-utmp is called with the
> > "runlevel" argument then it will add the "reboot" entry if necessary
> > automatically, followed by the "runlevel" entry.
> > Are you suggesting that this automatic logic isn't working correctly?
> On my notebook "reboot" line is never added. What is funny, it appears
> that on my test VM which has stripped down installation "reboot" does
> actually appear. Which suggests some race condition or uninitialized
> variable somewhere.
> Any suggestions how to debug it further?
Might want to check the activation timestamps shown in "systemctl show
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel