mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 05:37:40 +03:00
Write a reboot record to /var/log/wtmp
This commit is contained in:
parent
4be44d011b
commit
50d942960e
@ -608,5 +608,14 @@ in
|
||||
|
||||
users.extraGroups.systemd-journal.gid = config.ids.gids.systemd-journal;
|
||||
|
||||
# FIXME: This should no longer be needed with systemd >= 204.
|
||||
systemd.services."systemd-update-utmp-reboot.service" =
|
||||
{ description = "Update UTMP about System Reboot";
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.ExecStart = "${systemd}/lib/systemd/systemd-update-utmp reboot";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -47,6 +47,11 @@
|
||||
subtest "blkio-cgroup", sub {
|
||||
$machine->succeed("[ -n \"\$(cat /sys/fs/cgroup/blkio/blkio.sectors)\" ]")
|
||||
};
|
||||
|
||||
# Test whether we have a reboot record in wtmp.
|
||||
subtest "reboot-wtmp", sub {
|
||||
$machine->succeed("last | grep reboot >&2");
|
||||
};
|
||||
'';
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user