[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: services: Create /var/log upon activation.

From: Ludovic Courtès
Subject: 02/03: services: Create /var/log upon activation.
Date: Fri, 10 Mar 2017 08:48:24 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit fe2b6434f02c8abb26aebb59c4e0d0ccacb4fc90
Author: Christopher Baines <address@hidden>
Date:   Thu Feb 23 08:20:57 2017 +0000

    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 <address@hidden>
 gnu/services.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index 6ac4f13..6c88f26 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -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)))
-                      (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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]