From dc08b4af9d02d50ab3c7916d9c90af6c161c3d98 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Fri, 17 Nov 2023 20:00:29 +0100 Subject: [PATCH] replace true with real check --- usr/lib/archboot/cpio/init.sh | 3 +-- usr/lib/archboot/login.sh | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/lib/archboot/cpio/init.sh b/usr/lib/archboot/cpio/init.sh index dbef74b3f..16ce3e81e 100755 --- a/usr/lib/archboot/cpio/init.sh +++ b/usr/lib/archboot/cpio/init.sh @@ -30,7 +30,7 @@ _clear() { # $1: start percentage $2: end percentage $3: message $4: sleep time _progress_wait() { _COUNT=${1} - while true; do + while [[ -e /.archboot ]]; do if [[ "${_COUNT}" -lt "${2}" ]]; then _progress "${_COUNT}" "${3}" fi @@ -39,7 +39,6 @@ _progress_wait() { fi _COUNT="$((_COUNT+1))" sleep "${4}" - ! [[ -e /.archboot ]] && break done } _task() { diff --git a/usr/lib/archboot/login.sh b/usr/lib/archboot/login.sh index 426ec7e82..24615db4d 100644 --- a/usr/lib/archboot/login.sh +++ b/usr/lib/archboot/login.sh @@ -55,6 +55,7 @@ if [[ "${TTY}" = "tty1" ]]; then : > /.archboot _create_btrfs & _progress_wait "0" "10" "Creating btrfs on /dev/zram0..." "0.2" + # avoid clipping, insert status message _progress "10" "Creating btrfs on /dev/zram0..." : > /.archboot _copy_root &