[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/12: services: dhcp-client-configuration: Add 'shepherd-requirement' f
From: |
guix-commits |
Subject: |
02/12: services: dhcp-client-configuration: Add 'shepherd-requirement' field. |
Date: |
Thu, 11 May 2023 10:39:25 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 61031dd32fe948d927472a8ade60df6441cc6655
Author: Sergey Trofimov <sarg@sarg.org.ru>
AuthorDate: Tue Apr 11 09:33:57 2023 +0200
services: dhcp-client-configuration: Add 'shepherd-requirement' field.
* gnu/services/networking.scm (<dhcp-client-configuration>)
[shepherd-requirement]: New field.
(dhcp-client-shepherd-service): Honor it.
(dhcp-client-configuration-shepherd-requirement): Export accessor.
* doc/guix.texi (Networking Setup): Document it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
doc/guix.texi | 8 +++++++-
gnu/services/networking.scm | 6 +++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 27fc3b1689..2871fb9957 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20000,6 +20000,12 @@ should listen on---e.g., @code{'("eno1")}.
When set to @code{'all}, the DHCP client listens on all the available
non-loopback interfaces that can be activated. Otherwise the DHCP
client listens only on the specified interfaces.
+
+@item @code{shepherd-requirement} (default: @code{'()})
+This option can be used to provide a list of symbols naming Shepherd services
+that this service will depend on, such as @code{'wpa-supplicant} or
+@code{'iwd} if you require authenticated access for encrypted WiFi or Ethernet
+networks.
@end table
@end deftp
@@ -20103,7 +20109,7 @@ Data Type representing the configuration of connman.
@item @code{connman} (default: @var{connman})
The connman package to use.
-@item @code{shepherd-requirement} (default: @code{()})
+@item @code{shepherd-requirement} (default: @code{'()})
This option can be used to provide a list of symbols naming Shepherd services
that this service will depend on, such as @code{'wpa-supplicant} or
@code{'iwd} if you require authenticated access for encrypted WiFi or Ethernet
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 866368aa90..eb1fb6a7da 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -89,6 +89,7 @@
dhcp-client-configuration?
dhcp-client-configuration-package
dhcp-client-configuration-interfaces
+ dhcp-client-configuration-shepherd-requirement
dhcpd-service-type
dhcpd-configuration
@@ -288,6 +289,8 @@
dhcp-client-configuration?
(package dhcp-client-configuration-package ;file-like
(default isc-dhcp))
+ (shepherd-requirement dhcp-client-configuration-shepherd-requirement
+ (default '()))
(interfaces dhcp-client-configuration-interfaces
(default 'all))) ;'all | list of strings
@@ -295,11 +298,12 @@
(match-lambda
((? dhcp-client-configuration? config)
(let ((package (dhcp-client-configuration-package config))
+ (shepherd-requirement
(dhcp-client-configuration-shepherd-requirement config))
(interfaces (dhcp-client-configuration-interfaces config))
(pid-file "/var/run/dhclient.pid"))
(list (shepherd-service
(documentation "Set up networking via DHCP.")
- (requirement '(user-processes udev))
+ (requirement `(user-processes udev ,@shepherd-requirement))
;; XXX: Running with '-nw' ("no wait") avoids blocking for a
minute when
;; networking is unavailable, but also means that the interface
is not up
- branch master updated (ef0aa7ff8b -> 1e4c45b0dc), guix-commits, 2023/05/11
- 02/12: services: dhcp-client-configuration: Add 'shepherd-requirement' field.,
guix-commits <=
- 01/12: gnu: home: services: fontutils: Add support for SXML fragments., guix-commits, 2023/05/11
- 10/12: services: Add vnstat-service-type., guix-commits, 2023/05/11
- 08/12: gnu: barrier: Include NULL compatibility., guix-commits, 2023/05/11
- 07/12: gnu: git: Update to 2.40.1 [security fixes]., guix-commits, 2023/05/11
- 09/12: doc: Update dicod-configuration example, guix-commits, 2023/05/11
- 05/12: gnu: laby: Make laby function in pure environments., guix-commits, 2023/05/11
- 12/12: tests: Add vnstat tests., guix-commits, 2023/05/11
- 03/12: doc: Clarify substitute* docstring with an example., guix-commits, 2023/05/11
- 06/12: gnu: laby: Add patch for being able to execute game code., guix-commits, 2023/05/11
- 04/12: gnu: laby: Use new package style., guix-commits, 2023/05/11