summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-05-24 12:44:58 +0200
committerLudovic Courtès <ludo@gnu.org>2023-05-24 15:04:00 +0200
commit689460f82ad0f33253cd2e1b621febf1ed74a402 (patch)
tree6f77bc975807cdeb800671ed5924724affd13c42
parent8b18fa7e0777473d815743027f9a3a81a696db50 (diff)
downloadguix-689460f82ad0f33253cd2e1b621febf1ed74a402.tar.gz
services: guix: Depend on 'avahi-daemon' when 'discover?' is set.
Previously, with shepherd 0.10.0, guix-daemon would start quickly,
possibly before avahi-daemon is running.  Consequently, its "guix
discover" child process would exit immediately with a warning saying
"Avahi daemon is not running".

* gnu/services/base.scm (guix-shepherd-service): When DISCOVER? is true,
add 'avahi-daemon' to 'requirement'.
-rw-r--r--gnu/services/base.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index fd79c9e232..c5b06b57e8 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1842,7 +1842,8 @@ proxy of 'guix-daemon'...~%")
     (list (shepherd-service
            (documentation "Run the Guix daemon.")
            (provision '(guix-daemon))
-           (requirement '(user-processes))
+           (requirement `(user-processes
+                          ,@(if discover? '(avahi-daemon) '())))
            (actions (list shepherd-set-http-proxy-action
                           shepherd-discover-action))
            (modules '((srfi srfi-1)