guix-commits
[Top][All Lists]
Advanced

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

25/197: installer: Connect ethernet interfaces on selection.


From: Danny Milosavljevic
Subject: 25/197: installer: Connect ethernet interfaces on selection.
Date: Mon, 3 Jul 2017 20:36:54 -0400 (EDT)

dannym pushed a commit to branch wip-installer-2
in repository guix.

commit 67ed97ea15e672913d9a4192f556fc315733142a
Author: John Darrington <address@hidden>
Date:   Sat Dec 24 12:27:21 2016 +0100

    installer: Connect ethernet interfaces on selection.
    
    * gnu/system/installer/network.scm (network-page-key-handler) : Add handler 
for
    'continue and select cases.
---
 gnu/system/installer/network.scm | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/gnu/system/installer/network.scm b/gnu/system/installer/network.scm
index db49b0f..e17f940 100644
--- a/gnu/system/installer/network.scm
+++ b/gnu/system/installer/network.scm
@@ -96,13 +96,12 @@
                                    (assq-ref (menu-get-current-item menu) 
'name))))
         (set! page-stack (cons next page-stack))
         ((page-refresh next) next)))
-    
-
-     ((buttons-key-matches-symbol? nav ch 'continue)
-       (delwin (outer (page-wwin page)))
-       (set! page-stack (cdr page-stack))
-       ((page-refresh (car page-stack)) (car page-stack)))
 
+     ((select-key? ch)
+      (let ((item (menu-get-current-item menu)))
+        (when (eq? (assq-ref item 'class) 'ethernet)
+          (and (zero? (system* "ip" "link" "set" (assq-ref item 'name) "up"))
+               (zero? (system* "dhclient" (assq-ref item 'name)))))))
 
      ((buttons-key-matches-symbol? nav ch 'test)
        (let ((next  (make-page (page-surface page)
@@ -111,7 +110,12 @@
                                ping-page-key-handler)))
          
               (set! page-stack (cons next page-stack))
-              ((page-refresh next) next))))
+              ((page-refresh next) next)))
+
+     ((buttons-key-matches-symbol? nav ch 'continue)
+     (delwin (outer (page-wwin page)))
+     (delwin (inner (page-wwin page)))
+     (set! page-stack (cdr page-stack))))
     
     (std-menu-key-handler menu ch))
   #f)



reply via email to

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