Skip to content

Commit

Permalink
Add wait for keyring initialization (#3)
Browse files Browse the repository at this point in the history
* added check for keyring initialization
* update archlinux-keyring prior to pacstrap
  • Loading branch information
husjon committed Feb 3, 2024
1 parent e0e87fd commit 3e44004
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions arch-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,21 @@ case $STAGE in

# }}}
# pacstrap {{{
KEYRING_INITIALIZING="$(mktemp)"
echo "Waiting for arch-keyring to initialize"
for _ in {1..300}; do
systemctl show pacman-init.service | \
grep -q 'SubState=exited' && \
rm -f $KEYRING_INITIALIZING && \
break
sleep 1
done
if [ -f $KEYRING_INITIALIZING ]; then
echo "Keyring did not initialize, aborting!"
exit 1
fi

yes | pacman -Sy archlinux-keyring
pacstrap -K /mnt "${PACKAGES[@]}"
# }}}
# genfstab {{{
Expand Down

0 comments on commit 3e44004

Please sign in to comment.