From 1c5d54b2dfef5667f19c0ee22d13bde9cff80ae4 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Wed, 6 Sep 2023 14:51:07 +0200 Subject: 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 4a899c5a239eb50df3f596af4ff145f4a2d33f23. --- .semaphore/semaphore-runner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.semaphore') diff --git a/.semaphore/semaphore-runner.sh b/.semaphore/semaphore-runner.sh index 63c5fdfea7..13456609ad 100755 --- a/.semaphore/semaphore-runner.sh +++ b/.semaphore/semaphore-runner.sh @@ -30,7 +30,7 @@ create_container() { sudo lxc-attach -n "$CONTAINER" -- sh -ex <>/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 -- cgit v1.2.3