Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2019-06-20 14:46:11 +0000
committerGitHub <noreply@github.com>2019-06-20 14:46:11 +0000
commit2b8ec903b153c4466bb6081fb6b15fe5aa157d8f (patch)
treee7c1c0fd07ca5c2308bf699fca3b5eee4ec3662a /archinstall.py
parent0bbdc745663777f7f88da18342632bf9dc7dfd33 (diff)
Update archinstall.py
Made sure "ranking mirrors" doesn't show up unless it's actually happening. And added an extra safe guard :) Can't just YOLO the country variable.
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/archinstall.py b/archinstall.py
index 8e5ffca6..73917185 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -583,8 +583,8 @@ if __name__ == '__main__':
os.makedirs('/mnt/boot')
o = b''.join(sys_command('/usr/bin/mount {drive}{partition_1} /mnt/boot'.format(**args)).exec())
- print('[N] Reordering mirrors.')
- if 'mirrors' in args and args['mirrors'] and get_default_gateway_linux():
+ if 'mirrors' in args and args['mirrors'] and 'country' in args and get_default_gateway_linux():
+ print('[N] Reordering mirrors.')
o = b''.join(sys_command("/usr/bin/wget 'https://www.archlinux.org/mirrorlist/?country={country}&protocol=https&ip_version=4&ip_version=6&use_mirror_status=on' -O /root/mirrorlist".format(**args)).exec())
o = b''.join(sys_command("/usr/bin/sed -i 's/#Server/Server/' /root/mirrorlist").exec())
o = b''.join(sys_command('/usr/bin/rankmirrors -n 6 /root/mirrorlist > /etc/pacman.d/mirrorlist').exec())