aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/networking.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-05-19 22:27:25 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-05-19 22:46:52 -0400
commita09cdf1f9d25abd1b3910409787a58386ebc21e2 (patch)
treebbd9c78cb72d65adcd957d3f7d929cdb1ce9e9b0 /gnu/services/networking.scm
parent75abb0124705caa7a5b7ea1053ced6e1dc528561 (diff)
downloadguix-a09cdf1f9d25abd1b3910409787a58386ebc21e2.tar
guix-a09cdf1f9d25abd1b3910409787a58386ebc21e2.tar.gz
services: opendht: Fix hang at boot.
Fixes <https://issues.guix.gnu.org/48521>. The problem was caused by the 'file-system-mapping' record not being in scope. * gnu/services/networking.scm (opendht-shepherd-service): Import the (gnu system file-systems) module. [requirement]: Depend on networking, to avoid spurious output. [modules]: New field. [start] <group>: New argument.
Diffstat (limited to 'gnu/services/networking.scm')
-rw-r--r--gnu/services/networking.scm28
1 files changed, 17 insertions, 11 deletions
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index d713042a9f..b78c8ceacc 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -839,17 +839,23 @@ CONFIG, an <opendht-configuration> object."
(define (opendht-shepherd-service config)
"Return a <shepherd-service> running OpenDHT."
- (shepherd-service
- (documentation "Run an OpenDHT node.")
- (provision '(opendht dhtnode dhtproxy))
- (requirement '(user-processes syslogd))
- (start #~(make-forkexec-constructor/container
- (list #$@(opendht-configuration->command-line-arguments config))
- #:mappings (list (file-system-mapping
- (source "/dev/log") ;for syslog
- (target source)))
- #:user "opendht"))
- (stop #~(make-kill-destructor))))
+ (with-imported-modules (source-module-closure
+ '((gnu build shepherd)
+ (gnu system file-systems)))
+ (shepherd-service
+ (documentation "Run an OpenDHT node.")
+ (provision '(opendht dhtnode dhtproxy))
+ (requirement '(networking syslogd))
+ (modules '((gnu build shepherd)
+ (gnu system file-systems)))
+ (start #~(make-forkexec-constructor/container
+ (list #$@(opendht-configuration->command-line-arguments config))
+ #:mappings (list (file-system-mapping
+ (source "/dev/log") ;for syslog
+ (target source)))
+ #:user "opendht"
+ #:group "opendht"))
+ (stop #~(make-kill-destructor)))))
(define opendht-service-type
(service-type