aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/file-systems.scm
diff options
context:
space:
mode:
authorMarius Bakke2018-12-22 15:26:30 +0100
committerMarius Bakke2018-12-22 15:26:30 +0100
commitf30830b2e67d973f2363903dbe5b27269da1901a (patch)
tree851a3a361cde2e083c418c54a1932bd57096c5a0 /gnu/build/file-systems.scm
parent34f1838f04c7c359da8dbba86817499630ce7f01 (diff)
parent25ec3684e3529fae290d389ba11755c7e7c016ea (diff)
Merge branch 'master' into staging
Diffstat (limited to 'gnu/build/file-systems.scm')
-rw-r--r--gnu/build/file-systems.scm15
1 files changed, 12 insertions, 3 deletions
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 3f97afeed..e3369d852 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -535,10 +535,19 @@ were found."
(sleep 3)
(reboot))
('fatal-error
- (format (current-error-port)
- "File system check on ~a failed; spawning Bourne-like REPL~%"
+ (format (current-error-port) "File system check on ~a failed~%"
device)
- (start-repl %bournish-language)))
+
+ ;; Spawn a REPL only if someone would be able to interact with it.
+ (when (isatty? (current-input-port))
+ (format (current-error-port) "Spawning Bourne-like REPL.~%")
+
+ ;; 'current-output-port' is typically connected to /dev/klog (in
+ ;; PID 1), but here we want to make sure we talk directly to the
+ ;; user.
+ (with-output-to-file "/dev/console"
+ (lambda ()
+ (start-repl %bournish-language))))))
(format (current-error-port)
"No file system check procedure for ~a; skipping~%"
device)))

© 2015 - 2026 Jakob L. Kreuze