aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-05-07 12:45:43 +0200
committerLudovic Courtès <ludo@gnu.org>2020-05-07 12:55:15 +0200
commit5aa4d2dcf2f4f8786358feb45338893ed08a4cd9 (patch)
tree62e805719ade2e2028769f161e462c3b516a27d1 /gnu/services
parentd6c43d7bc1543f22bb850a2bad529bf3d60789ad (diff)
downloadpatches-5aa4d2dcf2f4f8786358feb45338893ed08a4cd9.tar
patches-5aa4d2dcf2f4f8786358feb45338893ed08a4cd9.tar.gz
Revert "services: syslog: Simplify 'start' method."
This reverts commit 4c0cc7bed3de2c0e2d3a6e95b88693941e839eec. Fixes <https://bugs.gnu.org/41116>. Reported by Alex Sassmannshausen <alex@komputilo.eu>. The problem is that reconfiguring on a system running Shepherd < 0.8.0 would lead to an error, due to #:file-creation-mask not being supported. The error is rather harmless: it prevents service upgrade but the system itself is upgraded. We can reinstate that commit eventually, once #:file-creation-mask has become widespread.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm18
1 files changed, 11 insertions, 7 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index a031ccc04b..b14bbcc3cd 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1316,13 +1316,17 @@ Service Switch}, for an example."
(documentation "Run the syslog daemon (syslogd).")
(provision '(syslogd))
(requirement '(user-processes))
- (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"))
+ (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))))
(stop #~(make-kill-destructor))))))
;; Snippet adapted from the GNU inetutils manual.