dannym pushed a commit to branch wip-installer-2
in repository guix.
commit a98e865653ad89badd2bd93d79cf0b0371403e39
Author: John Darrington <[email protected]>
Date: Mon Jan 2 11:05:45 2017 +0100
installer: Add option to final page to reboot the system.
* gnu/system/installer/install.scm (install-page-key-handler): Add
option to reboot.
---
gnu/system/installer/install.scm | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/gnu/system/installer/install.scm b/gnu/system/installer/install.scm
index 65e7520..4e97548 100644
--- a/gnu/system/installer/install.scm
+++ b/gnu/system/installer/install.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016 John Darrington <[email protected]>
+;;; Copyright © 2016, 2017 John Darrington <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -42,6 +42,7 @@
(define my-buttons `((continue ,(N_ "_Continue") #t)
+ (reboot ,(N_ "_Reboot") #t)
(back ,(N_ "_Back") #t)))
(define (install-page-key-handler page ch)
@@ -73,6 +74,9 @@
(delwin (inner (page-wwin page)))
(set! page-stack (cdr page-stack)))
+ ((buttons-key-matches-symbol? nav ch 'reboot)
+ (system* "reboot"))
+
((buttons-key-matches-symbol? nav ch 'continue)
(let ((target "/target")
(window-port (make-window-port config-window))
@@ -99,7 +103,7 @@
target))
(display (gettext
- "Installation is complete. You should reboot now.")
+ "Installation is complete. You should remove the
device containing the installer image and reboot now.")
window-port)))
(lambda (key . args)
#f)
@@ -130,7 +134,7 @@
3 (getmaxx (inner pr))
0 0
#:panel #f))
-
+
(bwin (derwin (inner pr)
3 (getmaxx (inner pr))
(- (getmaxy (inner pr)) 3) 0
@@ -161,4 +165,4 @@
(refresh (outer pr))
(refresh text-window)
(refresh bwin)))
-
+