Patchwork gnu: services: Activate system prior to services

login
register
mail settings
Submitter Christopher Baines
Date Dec. 10, 2016, 10:21 a.m.
Message ID <20161210102143.14582-2-mail@cbaines.net>
Download mbox | patch
Permalink /patch/18339/
State New
Headers show

Comments

Christopher Baines - Dec. 10, 2016, 10:21 a.m.
* gnu/services.scm: Activate the current system prior to the services,
  as this allows the services to use the files from the system, for
  example locales, in the service activation process.
---
 gnu/services.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/gnu/services.scm b/gnu/services.scm
index 693a7f8..5d2789c 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -338,12 +338,12 @@  ACTIVATION-SCRIPT-TYPE."
                       (activate-/bin/sh
                        (string-append #$(canonical-package bash) "/bin/sh"))
 
+                      ;; Set up /run/current-system.
+                      (activate-current-system)
+
                       ;; Run the services' activation snippets.
                       ;; TODO: Use 'load-compiled'.
-                      (for-each primitive-load '#$actions)
-
-                      ;; Set up /run/current-system.
-                      (activate-current-system))))))
+                      (for-each primitive-load '#$actions))))))
 
 (define (gexps->activation-gexp gexps)
   "Return a gexp that runs the activation script containing GEXPS."