guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

282/285: services: dhcp-client: Ignore interfaces that cannot be activat


From: guix-commits
Subject: 282/285: services: dhcp-client: Ignore interfaces that cannot be activated.
Date: Sun, 29 Dec 2019 20:44:48 -0500 (EST)

kkebreau pushed a commit to branch wip-gnome3.34
in repository guix.

commit b32771f73c076e8bc9a38bddc17cdcb94c8a832c
Author: Brice Waegeneire <address@hidden>
Date:   Sat Dec 14 08:23:26 2019 +0100

    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 <address@hidden>
---
 gnu/services/networking.scm | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 6485c08..59b895d 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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]