Browse Source

services: wpa-supplicant: Support specifying additional service dependencies.

* gnu/services/networking.scm (<wpa-supplicant-configuration>)[requirement]:
New parameter.
(wpa-supplicant-shepherd-service): Use it instead of hard-coded list.
* doc/guix.texi (Networking Services): Document accordingly.
Marius Bakke 2 years ago
parent
commit
4d06076714
No known key found for this signature in database GPG Key ID: A2A06DF2A33A54FA
  1. 3
      doc/guix.texi
  2. 9
      gnu/services/networking.scm

3
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.

9
gnu/services/networking.scm

@ -133,6 +133,7 @@
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 @@ whatever the thing is supposed to do).")))
wpa-supplicant-configuration?
(wpa-supplicant wpa-supplicant-configuration-wpa-supplicant ;<package>
(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 @@ whatever the thing is supposed to do).")))
(define wpa-supplicant-shepherd-service
(match-lambda
(($ <wpa-supplicant-configuration> wpa-supplicant pid-file dbus? interface
config-file extra-options)
(($ <wpa-supplicant-configuration> 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")

Loading…
Cancel
Save