From 747b7246a6d81ec2aafc9a1c737f85da3092c5dc Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Sat, 14 Dec 2019 08:23:26 +0100 Subject: services: dhcp-client: Ignore interfaces that cannot be activated. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . * gnu/services/networking.scm (dhcp-client-service-type): Filter interfaces that cannot be activated. Signed-off-by: Ludovic Courtès --- gnu/services/networking.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gnu/services') 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" -- cgit v1.2.3