services: avahi: Publish '_workstation._tcp' by default.

This reverts to the behavior of avahi-daemon prior to Avahi 0.7 (commit
550f4509ac).

* gnu/services/avahi.scm (<avahi-configuration>)[publish-workstation?]:
New field.
(configuration-file): Honor it.
This commit is contained in:
Ludovic Courtès 2018-02-18 23:26:23 +01:00
parent ad7a807d84
commit 37084ba561
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -47,6 +47,12 @@ (define-record-type* <avahi-configuration>
(default #f)) (default #f))
(host-name avahi-configuration-host-name) ;string (host-name avahi-configuration-host-name) ;string
(publish? avahi-configuration-publish?) ;Boolean (publish? avahi-configuration-publish?) ;Boolean
;; The default for this was #t in Avahi 0.6.31 and became #f in 0.7. For
;; now we stick to the old default.
(publish-workstation? avahi-configuration-publish-workstation? ;Boolean
(default #t))
(ipv4? avahi-configuration-ipv4?) ;Boolean (ipv4? avahi-configuration-ipv4?) ;Boolean
(ipv6? avahi-configuration-ipv6?) ;Boolean (ipv6? avahi-configuration-ipv6?) ;Boolean
(wide-area? avahi-configuration-wide-area?) ;Boolean (wide-area? avahi-configuration-wide-area?) ;Boolean
@ -77,7 +83,9 @@ (define host-name (avahi-configuration-host-name config))
"enable-wide-area=" (bool (avahi-configuration-wide-area? config)) "enable-wide-area=" (bool (avahi-configuration-wide-area? config))
"[publish]\n" "[publish]\n"
"disable-publishing=" "disable-publishing="
(bool (not (avahi-configuration-publish? config)))))) (bool (not (avahi-configuration-publish? config)))
"publish-workstation="
(bool (avahi-configuration-publish-workstation? config)))))
(define %avahi-accounts (define %avahi-accounts
;; Account and group for the Avahi daemon. ;; Account and group for the Avahi daemon.