From 269871d18e7d1a95fbe5dfa7360208110dde9163 Mon Sep 17 00:00:00 2001 From: Bruno Victal Date: Tue, 7 Mar 2023 12:44:01 +0000 Subject: services: connman: Add 'shepherd-requirement' field. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/networking.scm () [shepherd-requirement]: New field. (connman-shepherd-service): Honor it. (connman-configuration-shepherd-requirement): Export accessor. * doc/guix.texi (Networking Setup): Document it. Signed-off-by: Ludovic Courtès --- gnu/services/networking.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gnu') diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index abfaba8004..6a09f6e728 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -151,6 +151,7 @@ (define-module (gnu services networking) connman-configuration connman-configuration? connman-configuration-connman + connman-configuration-shepherd-requirement connman-configuration-disable-vpn? connman-configuration-iwd? connman-service-type @@ -1288,6 +1289,8 @@ (define-record-type* connman-configuration? (connman connman-configuration-connman (default connman)) + (shepherd-requirement connman-configuration-shepherd-requirement + (default '())) (disable-vpn? connman-configuration-disable-vpn? (default #f)) (iwd? connman-configuration-iwd? @@ -1303,13 +1306,14 @@ (define (connman-activation config) (mkdir-p "/var/lib/connman-vpn/")))))) (define (connman-shepherd-service config) - (match-record config (connman disable-vpn? iwd?) + (match-record config (connman shepherd-requirement + disable-vpn? iwd?) (list (shepherd-service (documentation "Run Connman") (provision '(networking)) - (requirement - (append '(user-processes dbus-system loopback) - (if iwd? '(iwd) '()))) + (requirement `(user-processes dbus-system loopback + ,@shepherd-requirement + ,@(if iwd? '(iwd) '()))) (start #~(make-forkexec-constructor (list (string-append #$connman "/sbin/connmand") -- cgit v1.2.3