Message ID | 9da03290-b031-fec0-11fe-a3f591b38f61@tom-fitzhenry.me.uk |
---|---|
State | New |
Headers | show |
Series | [bug#51548] services: Create /run and /var/run on activation. | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
Having thought about this patch some more, I think it can be better done. On 1/11/21 22:39, Tom Fitzhenry wrote: > ;; thus there is no accounting at all. > + (mkdir-p "/var/run") This line will create /var/run if it doesn't exist during activation. This is safe, but there is already code that creates /var/run : https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/install.scm?id=63c356fe13f0c7cc560a1f9aeec4926422c22137#n120 . This runs on installation. By adding this line, this responsibility is split across two parts of the code base: installation and activation. This could cause confusion. If, as this patch intends, we want to be able to boot from just /boot, /gnu and /var/guix, perhaps we should move https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/install.scm?id=63c356fe13f0c7cc560a1f9aeec4926422c22137#n120 (and surrounding code) from running at install-time to running at activation-time.
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"))