GNU bug report logs -
#62770
[PATCH] services: dhcp-client-configuration: Add 'shepherd-requirement' field.
Previous Next
Reported by: Sergey Trofimov <sarg <at> sarg.org.ru>
Date: Tue, 11 Apr 2023 07:35:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62770 in the body.
You can then email your comments to 62770 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#62770
; Package
guix-patches
.
(Tue, 11 Apr 2023 07:35:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sergey Trofimov <sarg <at> sarg.org.ru>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 11 Apr 2023 07:35:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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.
---
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 ac60acf98c..25f06fd0a8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -19892,6 +19892,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
@@ -19995,7 +20001,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 19c109d238..1b2e6a8c53 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -89,6 +89,7 @@ (define-module (gnu services networking)
dhcp-client-configuration?
dhcp-client-configuration-package
dhcp-client-configuration-interfaces
+ dhcp-client-configuration-shepherd-requirement
dhcpd-service-type
dhcpd-configuration
@@ -279,6 +280,8 @@ (define-record-type* <dhcp-client-configuration>
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
@@ -286,11 +289,12 @@ (define dhcp-client-shepherd-service
(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
--
2.39.2
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Thu, 11 May 2023 12:36:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Sergey Trofimov <sarg <at> sarg.org.ru>
:
bug acknowledged by developer.
(Thu, 11 May 2023 12:36:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 62770-done <at> debbugs.gnu.org (full text, mbox):
Hi,
Sergey Trofimov <sarg <at> sarg.org.ru> skribis:
> * 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.
Applied, thanks!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 09 Jun 2023 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 337 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.