Tweaking the mirror selection vs automatic mirror processes.
This commit is contained in:
parent
8494014c3b
commit
4dcafa7ec8
|
|
@ -9,5 +9,5 @@ def service_state(service_name :str):
|
|||
|
||||
state = b''.join(sys_command(f'systemctl show -p SubState --value {service_name}'))
|
||||
|
||||
return state.decode('UTF-8')
|
||||
return state.strip().decode('UTF-8')
|
||||
|
||||
|
|
@ -58,9 +58,13 @@ def select_mirror_regions(mirrors, show_top_mirrors=True):
|
|||
print(f"{index}: {region}")
|
||||
|
||||
print(' -- You can enter ? or help to search for more regions --')
|
||||
print(' -- You can skip this step by leaving the option blank --')
|
||||
print(' -- (You can use Shift + PageUp to scroll in the list --')
|
||||
selected_mirror = input('Select one of the above regions to download packages from (by number or full name): ')
|
||||
if selected_mirror.lower() in ('?', 'help'):
|
||||
if len(selected_mirror.strip()) == 0:
|
||||
return {}
|
||||
|
||||
elif selected_mirror.lower() in ('?', 'help'):
|
||||
filter_string = input('Search for a region containing (example: "united"): ').strip().lower()
|
||||
for region in mirrors:
|
||||
if filter_string in region.lower():
|
||||
|
|
|
|||
|
|
@ -7,9 +7,11 @@ 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':
|
||||
print(archinstall.service_state('reflector'))
|
||||
time.sleep(0.25)
|
||||
if len(mirrors):
|
||||
archinstall.log(f'Waiting for automatic mirror selection has completed before using custom mirrors.')
|
||||
while archinstall.service_state('reflector') != 'dead':
|
||||
print(archinstall.service_state('reflector'))
|
||||
time.sleep(0.25)
|
||||
|
||||
archinstall.use_mirrors(mirrors) # Set the mirrors for the live medium
|
||||
if installation.minimal_installation():
|
||||
|
|
|
|||
Loading…
Reference in New Issue