diff options
author | Maxim Cournoyer <[email protected]> | 2022-01-25 22:07:13 -0500 |
---|---|---|
committer | Maxim Cournoyer <[email protected]> | 2022-01-25 22:07:13 -0500 |
commit | 1a5302435ff0d2822b823f5a6fe01faa7a85c629 (patch) | |
tree | ac7810c88b560532f22d2bab2e59609cd7305c21 /gnu/installer/newt/network.scm | |
parent | 3ff2ac4980dacf10087e4b42bd9fbc490591900c (diff) | |
parent | 070b8a893febd6e7d8b2b7c8c4dcebacf7845aa9 (diff) |
Merge branch 'master' into staging.
With "conflicts" solved (all in favor of master except git) in:
gnu/local.mk
gnu/packages/databases.scm
gnu/packages/glib.scm
gnu/packages/gnome.scm
gnu/packages/gnupg.scm
gnu/packages/gnuzilla.scm
gnu/packages/graphics.scm
gnu/packages/gstreamer.scm
gnu/packages/gtk.scm
gnu/packages/linux.scm
gnu/packages/machine-learning.scm
gnu/packages/networking.scm
gnu/packages/polkit.scm
gnu/packages/pulseaudio.scm
gnu/packages/rpc.scm
gnu/packages/rust.scm
gnu/packages/version-control.scm
gnu/packages/w3m.scm
Diffstat (limited to 'gnu/installer/newt/network.scm')
-rw-r--r-- | gnu/installer/newt/network.scm | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gnu/installer/newt/network.scm b/gnu/installer/newt/network.scm index 4af7143d63..fb221483c3 100644 --- a/gnu/installer/newt/network.scm +++ b/gnu/installer/newt/network.scm @@ -30,6 +30,8 @@ #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (ice-9 match) + #:use-module (web client) + #:use-module (web response) #:use-module (newt) #:export (run-network-page)) @@ -119,8 +121,23 @@ network devices were found. Do you want to continue anyway?")) (define (wait-service-online) "Display a newt scale until connman detects an Internet access. Do FULL-VALUE tentatives, spaced by 1 second." + (define (ci-available?) + (dynamic-wind + (lambda () + (sigaction SIGALRM + (lambda _ #f)) + (alarm 3)) + (lambda () + (false-if-exception + (= (response-code + (http-request "https://ci.guix.gnu.org")) + 200))) + (lambda () + (alarm 0)))) + (define (online?) - (or (connman-online?) + (or (and (connman-online?) + (ci-available?)) (file-exists? "/tmp/installer-assume-online"))) (let* ((full-value 5)) @@ -137,7 +154,7 @@ FULL-VALUE tentatives, spaced by 1 second." (unless (online?) (run-error-page (G_ "The selected network does not provide access to the \ -Internet, please try again.") +Internet and the Guix substitute server, please try again.") (G_ "Connection error")) (raise (condition |