diff options
author | Sergey Trofimov <sarg@sarg.org.ru> | 2023-04-11 09:33:57 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-05-11 16:38:28 +0200 |
commit | 61031dd32fe948d927472a8ade60df6441cc6655 (patch) | |
tree | ec431a1198be310460e1324bc41b6f04d5c03801 /gnu | |
parent | 8d442e8a53b8ef3727252425afe2cfb922f51368 (diff) | |
download | guix-61031dd32fe948d927472a8ade60df6441cc6655.tar.gz |
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>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/services/networking.scm | 6 |
1 files changed, 5 insertions, 1 deletions
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 |