3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

services: Create /var/log upon activation.

When launching a container created with guix system container, the
attempt to create /var/log/wtmp would fail, as /var/log did not exist.

* gnu/services.scm (activation-script): Create /var/log

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Christopher Baines 2017-02-23 08:20:57 +00:00 committed by Ludovic Courtès
parent 82ccc499f7
commit fe2b6434f0
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -334,9 +334,11 @@ ACTIVATION-SCRIPT-TYPE."
(mlet* %store-monad ((actions (service-activations)))
(gexp->file "activate"
(with-imported-modules (source-module-closure
'((gnu build activation)))
'((gnu build activation)
(guix build utils)))
#~(begin
(use-modules (gnu build activation))
(use-modules (gnu build activation)
(guix build utils))
;; Make sure the user accounting database exists. If it
;; does not exist, 'setutxent' does not create it and
@ -345,6 +347,7 @@ ACTIVATION-SCRIPT-TYPE."
;; Same for 'wtmp', which is populated by mingetty et
;; al.
(mkdir-p "/var/log")
(close-port (open-file "/var/log/wtmp" "a0"))
;; Set up /run/current-system. Among other things this