refactor(os): Remind ourselves /etc/pacman.conf is ephemeral (#3)

This commit is contained in:
hygienic-books 2023-10-20 15:37:56 +02:00
parent 1ac2353d64
commit 5cb1e6b1f2

View File

@ -252,6 +252,8 @@ function copy_zpool_cache () {
} }
function pacman_dl_parallel () { function pacman_dl_parallel () {
# We're setting this in Arch Linux ISO CD while we install proper Arch.
# No need to revert this later as it is ephemeral anyway.
sed -ri -e 's'$'\x1''^.*?(ParallelDownloads)[^\r\n\f]*'$'\x1''\1 = 20'$'\x1''g' '/etc/pacman.conf' sed -ri -e 's'$'\x1''^.*?(ParallelDownloads)[^\r\n\f]*'$'\x1''\1 = 20'$'\x1''g' '/etc/pacman.conf'
} }
@ -263,6 +265,9 @@ function pacman_dont_check_space () {
# overestimates required disk space. We instead assume an installation # overestimates required disk space. We instead assume an installation
# gets done with at least a 10 GiB drive which is plenty. Skip pacman's # gets done with at least a 10 GiB drive which is plenty. Skip pacman's
# size check. # size check.
#
# We're setting this in Arch Linux ISO CD while we install proper Arch.
# No need to revert this later as it is ephemeral anyway.
sed -ri -e 's'$'\x1''^.*?(CheckSpace)([^\r\n\f]*)'$'\x1''#\1\2'$'\x1''g' '/etc/pacman.conf' sed -ri -e 's'$'\x1''^.*?(CheckSpace)([^\r\n\f]*)'$'\x1''#\1\2'$'\x1''g' '/etc/pacman.conf'
} }