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
This commit is contained in:
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

View file

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