From 4d06076714f03da55d09efede055f0c40da3403e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 25 Jun 2020 00:33:38 +0200 Subject: services: wpa-supplicant: Support specifying additional service dependencies. * gnu/services/networking.scm ()[requirement]: New parameter. (wpa-supplicant-shepherd-service): Use it instead of hard-coded list. * doc/guix.texi (Networking Services): Document accordingly. --- doc/guix.texi | 3 +++ gnu/services/networking.scm | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 7823367605..ce17c2de8e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14172,6 +14172,9 @@ It takes the following parameters: @item @code{wpa-supplicant} (default: @code{wpa-supplicant}) The WPA Supplicant package to use. +@item @code{requirement} (default: @code{'(user-processes dbus-system loopback syslogd)} +List of services that should be started before WPA Supplicant starts. + @item @code{dbus?} (default: @code{#t}) Whether to listen for requests on D-Bus. diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index bd01df1ba7..348dc369d8 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -133,6 +133,7 @@ (define-module (gnu services networking) wpa-supplicant-configuration wpa-supplicant-configuration? wpa-supplicant-configuration-wpa-supplicant + wpa-supplicant-configuration-requirement wpa-supplicant-configuration-pid-file wpa-supplicant-configuration-dbus? wpa-supplicant-configuration-interface @@ -1319,6 +1320,8 @@ (define-record-type* wpa-supplicant-configuration? (wpa-supplicant wpa-supplicant-configuration-wpa-supplicant ; (default wpa-supplicant)) + (requirement wpa-supplicant-configuration-requirement ;list of symbols + (default '(user-processes dbus-system loopback syslogd))) (pid-file wpa-supplicant-configuration-pid-file ;string (default "/var/run/wpa_supplicant.pid")) (dbus? wpa-supplicant-configuration-dbus? ;Boolean @@ -1332,12 +1335,12 @@ (define-record-type* (define wpa-supplicant-shepherd-service (match-lambda - (($ wpa-supplicant pid-file dbus? interface - config-file extra-options) + (($ wpa-supplicant requirement pid-file dbus? + interface config-file extra-options) (list (shepherd-service (documentation "Run the WPA supplicant daemon") (provision '(wpa-supplicant)) - (requirement '(user-processes dbus-system loopback syslogd)) + (requirement requirement) (start #~(make-forkexec-constructor (list (string-append #$wpa-supplicant "/sbin/wpa_supplicant") -- cgit v1.2.3