add more gpg checks for slow aarch64 initialization

This commit is contained in:
Tobias Powalowski 2022-04-28 07:42:02 +02:00
parent dc51fc5c2c
commit f8045948d5

View file

@ -118,9 +118,20 @@ _clean_archboot() {
}
_gpg_check() {
# pacman-key process itself
while pgrep -x pacman-key > /dev/null 2>&1; do
sleep 2
sleep 1
done
# gpg finished in background
while pgrep -x gpg > /dev/null 2>&1; do
sleep 1
done
while true; do
# gpg-agent finished in background
[[ "$(pgrep -x gpg-agent -c)" == "2" ]] && break
sleep 1
done
while pgrep -x gpg-agent -c
[[ "${_RUNNING_ARCH}" == "x86_64" ]] && systemctl stop pacman-init.service
[[ "${_RUNNING_ARCH}" == "aarch64" ]] && systemctl stop pacman-init-arm.service
}