summary refs log tree commit diff
path: root/gnu/installer
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/installer')
-rw-r--r--gnu/installer/newt.scm10
-rw-r--r--gnu/installer/record.scm7
-rw-r--r--gnu/installer/utils.scm10
3 files changed, 24 insertions, 3 deletions
diff --git a/gnu/installer/newt.scm b/gnu/installer/newt.scm
index 61fb9cf2ca..fc851339d1 100644
--- a/gnu/installer/newt.scm
+++ b/gnu/installer/newt.scm
@@ -79,6 +79,13 @@ problem. The backtrace is displayed below~a. Please report it by email to \
   (newt-finish)
   (clear-screen))
 
+(define (newt-run-command . args)
+  (newt-suspend)
+  (clear-screen)
+  (define result (run-command args))
+  (newt-resume)
+  result)
+
 (define (final-page result prev-steps)
   (run-final-page result prev-steps))
 
@@ -150,4 +157,5 @@ problem. The backtrace is displayed below~a. Please report it by email to \
    (welcome-page welcome-page)
    (parameters-menu parameters-menu)
    (parameters-page parameters-page)
-   (dump-page dump-page)))
+   (dump-page dump-page)
+   (run-command newt-run-command)))
diff --git a/gnu/installer/record.scm b/gnu/installer/record.scm
index e7cd45ee83..23db3edd70 100644
--- a/gnu/installer/record.scm
+++ b/gnu/installer/record.scm
@@ -42,7 +42,8 @@
             installer-welcome-page
             installer-parameters-menu
             installer-parameters-page
-            installer-dump-page))
+            installer-dump-page
+            installer-run-command))
 
 
 ;;;
@@ -94,4 +95,6 @@
   ;; procedure (keyboard-layout-selection) -> void
   (parameters-page installer-parameters-page)
   ;; procedure (dump) -> void
-  (dump-page installer-dump-page))
+  (dump-page installer-dump-page)
+  ;; procedure command -> bool
+  (run-command installer-run-command))
diff --git a/gnu/installer/utils.scm b/gnu/installer/utils.scm
index 66c41ac2a1..fb62fb8896 100644
--- a/gnu/installer/utils.scm
+++ b/gnu/installer/utils.scm
@@ -25,6 +25,7 @@
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-19)
   #:use-module (srfi srfi-34)
+  #:use-module (srfi srfi-35)
   #:use-module (ice-9 control)
   #:use-module (ice-9 match)
   #:use-module (ice-9 popen)
@@ -39,6 +40,7 @@
             run-external-command-with-handler
             run-external-command-with-line-hooks
             run-command
+            run-command-in-installer
 
             syslog-port
             %syslog-line-hook
@@ -168,6 +170,14 @@ successfully, #f otherwise."
   (pause)
   succeeded?)
 
+(define run-command-in-installer
+  (make-parameter
+   (lambda (. args)
+     (raise
+      (condition
+       (&serious)
+       (&message (message "run-command-in-installer not set")))))))
+
 
 ;;;
 ;;; Logging.