me
/
guix
Archived
1
0
Fork 0

services: mpd: Fix log to file.

(match value (%unset-value ...)) is equivalent here to
(match value (_ ...)). Even if you set 'log-file to some path, it's always
"syslog" in the configuration file.

* gnu/services/audio.scm (mpd): Fix buggy 'match'.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: If397919c2844d856c69fe00b8907b7b3fd86e564
master
Yarl Baudig 2024-06-23 16:15:58 +02:00 committed by Maxim Cournoyer
parent 603d523fc3
commit 2455c4ded9
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 8 additions and 10 deletions

View File

@ -251,16 +251,14 @@ user-group instead~%"))
(configuration-field-error #f 'group value)))) (configuration-field-error #f 'group value))))
(define (mpd-log-file-sanitizer value) (define (mpd-log-file-sanitizer value)
(match value ;; XXX: While leaving the 'sys_log' option out of the mpd.conf file is
(%unset-value ;; supposed to cause logging to happen via systemd (elogind provides a
;; XXX: While leaving the 'sys_log' option out of the mpd.conf file is ;; compatible interface), this doesn't work (nothing gets logged); use
;; supposed to cause logging to happen via systemd (elogind provides a ;; syslog instead.
;; compatible interface), this doesn't work (nothing gets logged); use (let ((value (maybe-value value "syslog")))
;; syslog instead. (if (string? value)
"syslog") value
((? string?) (configuration-field-error #f 'log-file value))))
value)
(_ (configuration-field-error #f 'log-file value))))
;;; ;;;