test: use 'until' instead of 'while !'

In general, it's better to avoid a negation. And "!" is special, because it is
used for history expansion, i.e. the same command would behave differently if
pasted on the command line.

Inspired by 4a899c5a23.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2023-09-06 14:51:07 +02:00
committed by Luca Boccassi
parent 8b7f0eb6a8
commit 1c5d54b2df
18 changed files with 34 additions and 34 deletions

View File

@@ -30,7 +30,7 @@ create_container() {
sudo lxc-attach -n "$CONTAINER" -- sh -ex <<EOF
sed 's/^deb/deb-src/' /etc/apt/sources.list >>/etc/apt/sources.list.d/sources.list
# We might attach the console too soon
while ! systemctl --quiet --wait is-system-running; do sleep 1; done
until systemctl --quiet --wait is-system-running; do sleep 1; done
# Manpages database trigger takes a lot of time and is not useful in a CI
echo 'man-db man-db/auto-update boolean false' | debconf-set-selections
# Speed up dpkg, image is thrown away after the test