reuse sleep, it does not status 1 on exit than read -r -t

This commit is contained in:
Tobias Powalowski 2024-06-28 18:40:27 +02:00
parent e54953c961
commit 2dddae3bd7
2 changed files with 5 additions and 5 deletions

View file

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

View file

@ -62,10 +62,10 @@ if [[ "${_TTY}" = "tty1" ]]; then
rm -r /run/nextroot/sysroot &>"${_NO_LOG}"
rm /run/nextroot/sysroot/init &>"${_NO_LOG}"
_progress "100" "System is ready."
read -r -t 1
sleep 1
else
while true; do
read -r -t 1
sleep 1
done
fi
}