[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/07: services: dbus: Simplify 'dbus-uuidgen' invocation.
From: |
guix-commits |
Subject: |
05/07: services: dbus: Simplify 'dbus-uuidgen' invocation. |
Date: |
Wed, 13 Nov 2019 17:27:23 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 1f8ca28b9e517f73d1a640dbbd11eadbf35b885b
Author: Ludovic Courtès <address@hidden>
Date: Wed Nov 13 22:30:49 2019 +0100
services: dbus: Simplify 'dbus-uuidgen' invocation.
* gnu/services/dbus.scm (dbus-activation): Use the "--ensure" option of
'dbus-uuidgen' instead of forking and redirecting ports.
---
gnu/services/dbus.scm | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index a97ce17..7b3c810 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -176,18 +176,9 @@ includes the @code{etc/dbus-1/system.d} directories of
each package listed in
(unless (file-exists? "/etc/machine-id")
(format #t "creating /etc/machine-id...~%")
- (let ((prog (string-append #$(dbus-configuration-dbus config)
- "/bin/dbus-uuidgen")))
- ;; XXX: We can't use 'system' because the initrd's
- ;; guile system(3) only works when 'sh' is in $PATH.
- (let ((pid (primitive-fork)))
- (if (zero? pid)
- (call-with-output-file "/etc/machine-id"
- (lambda (port)
- (close-fdes 1)
- (dup2 (port->fdes port) 1)
- (execl prog)))
- (waitpid pid)))))))
+ (invoke (string-append #$(dbus-configuration-dbus config)
+ "/bin/dbus-uuidgen")
+ "--ensure=/etc/machine-id"))))
(define dbus-shepherd-service
(match-lambda
- branch master updated (f041db8 -> 35338b5), guix-commits, 2019/11/13
- 01/07: tests: "make check-system" uses Guix built with (guix self)., guix-commits, 2019/11/13
- 03/07: services: dbus: Add description., guix-commits, 2019/11/13
- 04/07: services: dbus: Log to syslog., guix-commits, 2019/11/13
- 05/07: services: dbus: Simplify 'dbus-uuidgen' invocation.,
guix-commits <=
- 06/07: doc: Drop stray quotation mark., guix-commits, 2019/11/13
- 07/07: gnu: Add emacs-spacegray-theme., guix-commits, 2019/11/13
- 02/07: daemon: Don't include <linux/fs.h>., guix-commits, 2019/11/13