Wait for internet connection before Windows installation
This commit is contained in:
parent
731eb7e31a
commit
9cc284e086
|
@ -95,6 +95,14 @@ $null = New-Module {
|
||||||
& {
|
& {
|
||||||
$initialized = $false;
|
$initialized = $false;
|
||||||
|
|
||||||
|
# Ping digitalcourage DNS server
|
||||||
|
# https://digitalcourage.de/
|
||||||
|
Write-Host "Waiting for internet connection…";
|
||||||
|
|
||||||
|
while ((Test-Connection -Count 1 5.9.164.112).Status -ne 'Success') {
|
||||||
|
Start-Sleep 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
while (-not $initialized) {
|
while (-not $initialized) {
|
||||||
if ($IsWindows) {
|
if ($IsWindows) {
|
||||||
if (-not ((Test-Command "choco") -and (Test-Command "refreshenv"))) {
|
if (-not ((Test-Command "choco") -and (Test-Command "refreshenv"))) {
|
||||||
|
|
Loading…
Reference in a new issue