all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Fitzhenry <tom@tom-fitzhenry.me.uk>
To: 51548@debbugs.gnu.org
Subject: [bug#51548] [PATCH] services: Create /run and /var/run on activation.
Date: Mon, 1 Nov 2021 22:39:48 +1100	[thread overview]
Message-ID: <9da03290-b031-fec0-11fe-a3f591b38f61@tom-fitzhenry.me.uk> (raw)

This is needed as part of being able to boot with just /boot, /guix and 
/var/guix, per https://issues.guix.gnu.org/51547.

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")
                        (activate-current-system)

                        ;; Run the services' activation snippets.
-- 
2.33.1




             reply	other threads:[~2021-11-01 13:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01 11:39 Tom Fitzhenry [this message]
2021-11-04  7:00 ` [bug#51548] [PATCH] services: Create /run and /var/run on activation Tom Fitzhenry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9da03290-b031-fec0-11fe-a3f591b38f61@tom-fitzhenry.me.uk \
    --to=tom@tom-fitzhenry.me.uk \
    --cc=51548@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.