From 7be14a53dc3426fe722036c189a611726d5e04dd Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 3 Jul 2022 02:59:54 +0700 Subject: all: use predefined pacman.conf The pacman.conf file is rarely updated, so we add the gce repository directly into file and use it during pacstrap and to replace the target root. --- build-arch-gce | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'build-arch-gce') diff --git a/build-arch-gce b/build-arch-gce index ececc62..2ea7fbb 100755 --- a/build-arch-gce +++ b/build-arch-gce @@ -65,21 +65,9 @@ mkdir -p -- "$mount_dir/boot" mount -- "$efi_dev" "$mount_dir/boot" echo '- Installing Arch Linux.' -append_gce_repo() { - gawk -i inplace ' - /^\[gce\]$/ { found = 1 } { print } - ENDFILE { if (!found) { - print "" - print "[gce]" - print "Server = https://storage.googleapis.com/arch-linux-gce/repo" - print "SigLevel = Optional TrustAll" - } }' "$1" -} -cp /etc/pacman.conf "$work_dir" -append_gce_repo "$work_dir/pacman.conf" -pacstrap -c -G -M -C "$work_dir/pacman.conf" -- "$mount_dir" \ +pacstrap -c -G -M -C "./sys/etc/pacman.conf" -- "$mount_dir" \ base linux dosfstools e2fsprogs dhclient openssh sudo google-compute-engine -append_gce_repo "$mount_dir/etc/pacman.conf" +cp -f ./sys/etc/pacman.conf "$mount_dir/etc/pacman.conf" echo '- Configuring fstab.' root_uuid=$(lsblk --noheadings --raw --output UUID -- "$root_dev") -- cgit v1.3