switch sleep to read -t

This commit is contained in:
Tobias Powalowski 2024-06-15 12:33:47 +02:00
parent 7eaf1af8f7
commit 12bdf9d093

View file

@ -109,7 +109,7 @@ _progress_wait() {
_progress "${2}" "${3}" _progress "${2}" "${3}"
fi fi
_COUNT="$((_COUNT+1))" _COUNT="$((_COUNT+1))"
sleep "${4}" read -t "${4}"
done done
} }
@ -311,11 +311,11 @@ _cachedir_check() {
_pacman_keyring() { _pacman_keyring() {
# pacman-key process itself # pacman-key process itself
while pgrep -x pacman-key &>"${_NO_LOG}"; do while pgrep -x pacman-key &>"${_NO_LOG}"; do
sleep 1 read -t 1
done done
# gpg finished in background # gpg finished in background
while pgrep -x gpg &>"${_NO_LOG}"; do while pgrep -x gpg &>"${_NO_LOG}"; do
sleep 1 read -t 1
done done
if [[ -e /etc/systemd/system/pacman-init.service ]]; then if [[ -e /etc/systemd/system/pacman-init.service ]]; then
systemctl stop pacman-init.service systemctl stop pacman-init.service