From 4778ffd3dc2dca52dee3564f59d3101b0dcdb9f1 Mon Sep 17 00:00:00 2001 From: Jan Baier Date: Thu, 1 Aug 2024 18:53:21 +0200 Subject: [PATCH] Allow openqa-bootstrap to clone job in non-systemd environments Run openqa-worker on background to allow script to continue with openqa-clone-job invocation, then wait for the worker process. Reference: https://progress.opensuse.org/issues/164595 --- script/openqa-bootstrap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/openqa-bootstrap b/script/openqa-bootstrap index 3b95c16acc1..755e4acb5aa 100755 --- a/script/openqa-bootstrap +++ b/script/openqa-bootstrap @@ -26,7 +26,7 @@ start-database() { start-worker() { if [[ -z $running_systemd ]]; then /usr/bin/install -d -m 0755 -o _openqa-worker /var/lib/openqa/pool/1 - su _openqa-worker -c '/usr/share/openqa/script/worker --instance 1' + su _openqa-worker -c '/usr/share/openqa/script/worker --instance 1' & else systemctl enable --now openqa-worker@1 fi @@ -182,3 +182,5 @@ start-worker if [[ $# -ne 0 ]]; then openqa-clone-job "$@" fi + +[[ -n $running_systemd ]] || wait