diff options
author | Diego Nicola Barbato <dnbarbato@posteo.de> | 2020-04-28 13:31:54 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-05-02 16:49:29 +0200 |
commit | 4c0cc7bed3de2c0e2d3a6e95b88693941e839eec (patch) | |
tree | c000d7384b477c7a2dbfb2ef1dfeba19c5ee5904 /gnu/services | |
parent | 61586ce9a22768926448fa16673f7c3a93ebc5c6 (diff) | |
download | patches-4c0cc7bed3de2c0e2d3a6e95b88693941e839eec.tar patches-4c0cc7bed3de2c0e2d3a6e95b88693941e839eec.tar.gz |
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 <ludo@gnu.org>
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/base.scm | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 2913478e4a..0f119cc2f9 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. |