aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrice Waegeneire <brice@waegenei.re>2019-12-14 08:23:26 +0100
committerLudovic Courtès <ludo@gnu.org>2019-12-29 18:24:55 +0100
commit747b7246a6d81ec2aafc9a1c737f85da3092c5dc (patch)
tree4b0dbd1a4958e73cbca22d9b7c38f5875700b2e1
parent7a241c63503c81a0f9ed284c7cc66da058aa00cf (diff)
downloadguix-747b7246a6d81ec2aafc9a1c737f85da3092c5dc.tar
guix-747b7246a6d81ec2aafc9a1c737f85da3092c5dc.tar.gz
services: dhcp-client: Ignore interfaces that cannot be activated.
Fixes <https://bugs.gnu.org/38524>. * gnu/services/networking.scm (dhcp-client-service-type): Filter interfaces that cannot be activated. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/services/networking.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 6485c08ff7..59b895d60b 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -234,14 +234,15 @@ fe80::1%lo0 apps.facebook.com\n")
(define valid?
(lambda (interface)
(and (arp-network-interface? interface)
- (not (loopback-network-interface? interface)))))
+ (not (loopback-network-interface? interface))
+ ;; XXX: Make sure the interfaces are up so that
+ ;; 'dhclient' can actually send/receive over them.
+ ;; Ignore those that cannot be activated.
+ (false-if-exception
+ (set-network-interface-up interface)))))
(define ifaces
(filter valid? (all-network-interface-names)))
- ;; XXX: Make sure the interfaces are up so that 'dhclient' can
- ;; actually send/receive over them.
- (for-each set-network-interface-up ifaces)
-
(false-if-exception (delete-file #$pid-file))
(let ((pid (fork+exec-command
(cons* #$dhclient "-nw"