From 2a358911b0cf5273380bb4f22a74879f31cecaaf Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 18 Nov 2022 15:40:14 +0100 Subject: services: tor: Remove unnecessary modules from shepherd environment. This is a followup to fb868cd7794f15e21298e5bdea996fbf0dad17ca. * gnu/services/networking.scm (tor-shepherd-service): Remove unused 'with-imported-modules' and 'modules' field. --- gnu/services/networking.scm | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) (limited to 'gnu/services/networking.scm') diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 18d1eb5b8c..de02f16a34 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1011,30 +1011,24 @@ (define (tor-shepherd-service config) (source torrc) (target source))) #:namespaces (delq 'net %namespaces)))) - (with-imported-modules (source-module-closure - '((gnu build shepherd) - (gnu system file-systems))) - (list (shepherd-service - (provision '(tor)) - - ;; Tor needs at least one network interface to be up, hence the - ;; dependency on 'loopback'. - (requirement '(user-processes loopback syslogd)) + (list (shepherd-service + (provision '(tor)) - (modules '((gnu build shepherd) - (gnu system file-systems))) + ;; Tor needs at least one network interface to be up, hence the + ;; dependency on 'loopback'. + (requirement '(user-processes loopback syslogd)) - ;; XXX: #:pid-file won't work because the wrapped 'tor' - ;; program would print its PID within the user namespace - ;; instead of its actual PID outside. There's no inetd or - ;; systemd socket activation support either (there's - ;; 'sd_notify' though), so we're stuck with that. - (start #~(make-forkexec-constructor - (list #$tor "-f" #$torrc) - #:user "tor" #:group "tor")) - (stop #~(make-kill-destructor)) - (actions (list (shepherd-configuration-action torrc))) - (documentation "Run the Tor anonymous network overlay.")))))))) + ;; XXX: #:pid-file won't work because the wrapped 'tor' + ;; program would print its PID within the user namespace + ;; instead of its actual PID outside. There's no inetd or + ;; systemd socket activation support either (there's + ;; 'sd_notify' though), so we're stuck with that. + (start #~(make-forkexec-constructor + (list #$tor "-f" #$torrc) + #:user "tor" #:group "tor")) + (stop #~(make-kill-destructor)) + (actions (list (shepherd-configuration-action torrc))) + (documentation "Run the Tor anonymous network overlay."))))))) (define (tor-activation config) "Set up directories for Tor and its hidden services, if any." -- cgit v1.2.3