[Top][All Lists]

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

[bug#51548] [PATCH] services: Create /run and /var/run on activation.

From: Tom Fitzhenry
Subject: [bug#51548] [PATCH] services: Create /run and /var/run on activation.
Date: Mon, 1 Nov 2021 22:39:48 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2

This is needed as part of being able to boot with just /boot, /guix and /var/guix, per

Without this patch, activation-on-boot fails due to the inability to open /var/run/utmpx and symlink /run/current-system.

This is similar to what activation-script does with /var/log/.

* gnu/services.scm (activation-script): Create /run/ and /var/run/.
 gnu/services.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/services.scm b/gnu/services.scm
index 1655218f2d..f60d7dc4c3 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -620,6 +620,7 @@ (define actions
;; Make sure the user accounting database exists. If it ;; does not exist, 'setutxent' does not create it and
                       ;; thus there is no accounting at all.
+                      (mkdir-p "/var/run")
                       (close-port (open-file "/var/run/utmpx" "a0"))

;; Same for 'wtmp', which is populated by mingetty et
@@ -630,6 +631,7 @@ (define actions
;; Set up /run/current-system. Among other things this
                       ;; sets up locales, which the activation snippets
                       ;; executed below may expect.
+                      (mkdir-p "/run")

                       ;; Run the services' activation snippets.

reply via email to

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