From 01dd3d5dbf72ea9e53e582d061fded719c124577 Mon Sep 17 00:00:00 2001 From: Yariv Rachmani Date: Thu, 22 Aug 2024 21:28:41 +0300 Subject: [PATCH] add support in QM image In case QM already runnig as a service tests/e2e/set-ffi-env-e2e will exit 0 in case service does not exist, it will contine In case of ostree image script will exit Signed-off-by: Yariv Rachmani --- tests/e2e/set-ffi-env-e2e | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/e2e/set-ffi-env-e2e b/tests/e2e/set-ffi-env-e2e index 6e1902c3..ab91c4c2 100755 --- a/tests/e2e/set-ffi-env-e2e +++ b/tests/e2e/set-ffi-env-e2e @@ -273,6 +273,28 @@ then exit fi +echo +info_message "Checking if QM already installed" +info_message "==============================" +QM_STATUS="$(systemctl is-enabled qm 2>&1)" +if [ "$QM_STATUS" == "genrated" ]; then + if [ "$(systemctl is-active qm)" == "active" ];then + info_message "QM Enabled and Active" + info_message "==============================" + exit 0 + else + info_message "QM Enabled and not Active" + info_message "==============================" + exit 1 + fi +fi + +if stat /run/ostree-booted > /dev/null 2>&1; then + info_message "script can not run on ostree image" + info_message "==============================" + exit 1 +fi + info_message "Cleaning any previous e2e files" info_message "==============================" cleanup