[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/07: services: syslog: Simplify 'start' method.
From: |
guix-commits |
Subject: |
01/07: services: syslog: Simplify 'start' method. |
Date: |
Sat, 2 May 2020 10:49:44 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 4c0cc7bed3de2c0e2d3a6e95b88693941e839eec
Author: Diego Nicola Barbato <address@hidden>
AuthorDate: Tue Apr 28 13:31:54 2020 +0200
services: syslog: Simplify 'start' method.
This is a followup to d7113bb655ff80a868a9e624c913f9d23e6c63ad and
e3358a831e7d5d9e8dc614340e49ea5aeb11a7ff.
* gnu/services/base.scm (syslog-service-type): Change 'start' method to set
umask using the #:file-creation-mask parameter of
'make-forkexec-constructor' introduced in version 0.8.0 of the Shepherd.
Signed-off-by: Ludovic Courtès <address@hidden>
---
gnu/services/base.scm | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 2913478..0f119cc 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1316,17 +1316,13 @@ Service Switch}, for an example."
(documentation "Run the syslog daemon (syslogd).")
(provision '(syslogd))
(requirement '(user-processes))
- (start #~(let ((spawn (make-forkexec-constructor
- (list #$(syslog-configuration-syslogd config)
- "--rcfile"
- #$(syslog-configuration-config-file config))
- #:pid-file "/var/run/syslog.pid")))
- (lambda ()
- ;; Set the umask such that file permissions are #o640.
- (let ((mask (umask #o137))
- (pid (spawn)))
- (umask mask)
- pid))))
+ (start #~(make-forkexec-constructor
+ (list #$(syslog-configuration-syslogd config)
+ "--rcfile"
+ #$(syslog-configuration-config-file config))
+ ;; Set the umask such that file permissions are #o640.
+ #:file-creation-mask #o137
+ #:pid-file "/var/run/syslog.pid"))
(stop #~(make-kill-destructor))))))
;; Snippet adapted from the GNU inetutils manual.
- branch master updated (61586ce -> afc5791), guix-commits, 2020/05/02
- 01/07: services: syslog: Simplify 'start' method.,
guix-commits <=
- 03/07: gnu: nanovg-for-extempore: Update to 0.7.1-0.3c60175., guix-commits, 2020/05/02
- 04/07: gnu: portmidi-for-extempore: Update to 217-0.8602f54., guix-commits, 2020/05/02
- 06/07: gnu: emacs-extempore-mode: Update to 0.0.0-1.09518ae., guix-commits, 2020/05/02
- 07/07: linux-boot: Allow the root file system to be mounted via NFS., guix-commits, 2020/05/02
- 02/07: gnu: llvm-for-extempore: Update to 3.8., guix-commits, 2020/05/02
- 05/07: gnu: extempore: Update to 0.8.6., guix-commits, 2020/05/02