Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-09-01 14:33:55 +0200
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-09-01 14:33:55 +0200
commit8daae75a78655a7472b448e6cc48a5922700379c (patch)
tree4e1125d0a2b9ae2f6e14d8c460adf07c76a2cef2 /examples
parente6293b7d44fa0eda8ff284e1b8853d166f9379ab (diff)
Adding service logic. Checking if reflector has finished before we select custom mirrors (if any)
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 33716221..f906df30 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -7,8 +7,12 @@ def perform_installation(device, boot_partition, language, mirrors):
formatted and setup prior to entering this function.
"""
with archinstall.Installer(device, boot_partition=boot_partition, hostname=hostname) as installation:
+ while archinstall.service_state('reflector') != 'dead':
+ time.sleep(0.25)
+
+ archinstall.use_mirrors(mirrors) # Set the mirrors for the live medium
if installation.minimal_installation():
- installation.set_mirrors(mirrors)
+ installation.set_mirrors(mirrors) # Set the mirrors in the installation medium
installation.set_keyboard_language(language)
installation.add_bootloader()
@@ -46,7 +50,6 @@ archinstall.set_keyboard_language(keyboard_language)
# Set which region to download packages from during the installation
mirror_regions = archinstall.select_mirror_regions(archinstall.list_mirrors())
-archinstall.use_mirrors(mirror_regions)
harddrive = archinstall.select_disk(archinstall.all_disks())
while (disk_password := getpass.getpass(prompt='Enter disk encryption password (leave blank for no encryption): ')):