summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-11-03 14:25:30 +0200
committerEfraim Flashner <efraim@flashner.co.il>2021-11-03 14:27:51 +0200
commit075df3d3e2f86ad2548075969b34402a3c40ec42 (patch)
tree303b422a84ce5ee1fccff610eaf83b20919e8b87 /gnu/services
parentaba40a6b7fdce56fe439668b3152ae4d4ddd1551 (diff)
parentb2721c3656e0ddf76dcccccfbacaaa309d2f47fe (diff)
Merge remote-tracking branch 'origin/master' into core-updates-frozen
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/configuration.scm16
1 files changed, 11 insertions, 5 deletions
diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm
index e8c55b6e4d..0de350a4df 100644
--- a/gnu/services/configuration.scm
+++ b/gnu/services/configuration.scm
@@ -359,10 +359,7 @@ DELIMITER interposed LS. Support 'infix and 'suffix GRAMMAR values."
(G_ "The GRAMMAR value must be 'infix or 'suffix, but ~a provided.")
grammar)))
(fold-right (lambda (e acc)
- (cons #~(begin
- (use-modules (ice-9 rdelim))
- (with-fluids ((%default-port-encoding "UTF-8"))
- (with-input-from-file #$e read-string)))
+ (cons e
(if (and (null? acc) (eq? grammar 'infix))
acc
(cons delimiter acc))))
@@ -387,7 +384,16 @@ the list result in @code{#t} when applying PRED? on them."
(define (text-config? config)
(list-of file-like?))
(define (serialize-text-config field-name val)
- #~(string-append #$@(interpose val "\n" 'suffix)))
+ #~(string-append
+ #$@(interpose
+ (map
+ (lambda (e)
+ #~(begin
+ (use-modules (ice-9 rdelim))
+ (with-fluids ((%default-port-encoding "UTF-8"))
+ (with-input-from-file #$e read-string))))
+ val)
+ "\n" 'suffix)))
(define ((generic-serialize-alist-entry serialize-field) entry)
"Apply the SERIALIZE-FIELD procedure on the field and value of ENTRY."