From 2986995b85e76f12741fcdda8dd0e1a636620dec Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 24 Jan 2017 00:45:11 +0100 Subject: services: Create /var/log/wtmp upon activation. This fixes a bug whereby /var/log/wtmp would never be created, and thus accounting information would be lost. * gnu/services.scm (activation-script): Create /var/log/wtmp. * gnu/tests/base.scm (run-basic-test)["wtmp entry"]: New test. --- gnu/services.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu/services.scm') diff --git a/gnu/services.scm b/gnu/services.scm index f72d4d5785..e645889d30 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -345,6 +345,10 @@ ACTIVATION-SCRIPT-TYPE." ;; thus there is no accounting at all. (close-port (open-file "/var/run/utmpx" "a0")) + ;; Same for 'wtmp', which is populated by mingetty et + ;; al. + (close-port (open-file "/var/log/wtmp" "a0")) + ;; Set up /run/current-system. Among other things this ;; sets up locales, which the activation snippets ;; executed below may expect. -- cgit v1.2.3