index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds+github@gmail.com> | 2019-11-19 00:30:01 +0000 |
---|---|---|
committer | Anton Hvornum <anton.feeds+github@gmail.com> | 2019-11-19 00:30:01 +0000 |
commit | 673e607d4b3d8fab76f93e58bbcada6e9c9e7d50 (patch) | |
tree | 8be9db55ac49d4bcc960495f5ff4f170c16f7415 | |
parent | 76731be748e0a45203d038430588faad3f62bd87 (diff) |
-rw-r--r-- | archinstall.py | 10 |
diff --git a/archinstall.py b/archinstall.py index be7f8d55..c9453bae 100644 --- a/archinstall.py +++ b/archinstall.py @@ -866,14 +866,14 @@ def mkfs_btrfs(drive='/dev/mapper/luksdev', *positionals, **kwargs): return True def mount_luksdev(where='/dev/mapper/luksdev', to='/mnt', *positionals, **kwargs): - o = simple_command('/usr/bin/mount | /usr/bin/grep /mnt') # /dev/dm-0 + o = b''.join(sys_command('/usr/bin/mount | /usr/bin/grep /mnt')) # /dev/dm-0 if len(o) <= 0: o = b''.join(sys_command('/usr/bin/mount /dev/mapper/luksdev /mnt')) return True def mount_boot(drive, partition, mountpoint='/mnt/boot', *positionals, **kwargs): os.makedirs('/mnt/boot', exist_ok=True) - o = simple_command('/usr/bin/mount | /usr/bin/grep /mnt/boot') # /dev/dm-0 + o = b''.join(sys_command('/usr/bin/mount | /usr/bin/grep /mnt/boot')) # /dev/dm-0 if len(o) <= 0: o = b''.join(sys_command(f'/usr/bin/mount {drive}{partition} {mountpoint}')) return True @@ -886,15 +886,15 @@ def mount_mountpoints(drive, bootpartition, mountpoint='/mnt/boot', *positionals return True def re_rank_mirrors(top=10, *positionals, **kwargs): - o = simple_command('/usr/bin/rankmirrors -n {top} /root/mirrorlist > /etc/pacman.d/mirrorlist') + o = b''.join(sys_command(('/usr/bin/rankmirrors -n {top} /root/mirrorlist > /etc/pacman.d/mirrorlist'))) def filter_mirrors_by_country(countries, top=10, *positionals, **kwargs): ## TODO: replace wget with urllib.request (no point in calling syscommand) country_list = [] for country in countries.split(','): country_list.append(f'country={country}') - o = simple_command(f"/usr/bin/wget 'https://www.archlinux.org/mirrorlist/?{'&'.join(country_list)}&protocol=https&ip_version=4&ip_version=6&use_mirror_status=on' -O /root/mirrorlist") - o = simple_command("/usr/bin/sed -i 's/#Server/Server/' /root/mirrorlist") + o = b''.join(sys_command((f"/usr/bin/wget 'https://www.archlinux.org/mirrorlist/?{'&'.join(country_list)}&protocol=https&ip_version=4&ip_version=6&use_mirror_status=on' -O /root/mirrorlist"))) + o = b''.join(sys_command(("/usr/bin/sed -i 's/#Server/Server/' /root/mirrorlist"))) re_rank_mirrors(top, *positionals, **kwargs) return True |