guix-commits
[Top][All Lists]
Advanced

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

06/22: installer: Connect ethernet interfaces on selection.


From: John Darrington
Subject: 06/22: installer: Connect ethernet interfaces on selection.
Date: Tue, 27 Dec 2016 06:02:08 +0000 (UTC)

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

commit 042a8d630cd0a5ee00c9c6dd526cce23757a5e4e
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]