services: WPA Supplicant: Conditionally depend on D-Bus.

Fixes <https://bugs.gnu.org/43567>.
Reported by calcium <calcium@disroot.org>.

* gnu/services/networking.scm (<wpa-supplicant-configuration>)[requirement]:
Remove 'dbus-system.
(wpa-supplicant-shepherd-service)[requirement]: Add 'dbus-system when DBUS? is true.
* doc/guix.texi (Networking Services)[wpa-supplicant-service-type]: Adjust
accordingly.
This commit is contained in:
Marius Bakke 2020-09-24 20:18:20 +02:00
parent d14a3e5c0c
commit d48b17adb9
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA
2 changed files with 5 additions and 3 deletions

View file

@ -14603,7 +14603,7 @@ 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)}
@item @code{requirement} (default: @code{'(user-processes loopback syslogd)}
List of services that should be started before WPA Supplicant starts.
@item @code{dbus?} (default: @code{#t})

View file

@ -1324,7 +1324,7 @@ (define-record-type* <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)))
(default '(user-processes loopback syslogd)))
(pid-file wpa-supplicant-configuration-pid-file ;string
(default "/var/run/wpa_supplicant.pid"))
(dbus? wpa-supplicant-configuration-dbus? ;Boolean
@ -1343,7 +1343,9 @@ (define wpa-supplicant-shepherd-service
(list (shepherd-service
(documentation "Run the WPA supplicant daemon")
(provision '(wpa-supplicant))
(requirement requirement)
(requirement (if dbus?
(cons 'dbus-system requirement)
requirement))
(start #~(make-forkexec-constructor
(list (string-append #$wpa-supplicant
"/sbin/wpa_supplicant")