From 65c96850c08965e7e585236648fd8840a0926caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Anguita=20L=C3=B3pez?= Date: Wed, 9 Oct 2024 11:49:18 +0200 Subject: [PATCH] unified ifs --- install_functions/wazuh-offline-installation.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install_functions/wazuh-offline-installation.sh b/install_functions/wazuh-offline-installation.sh index aea9a0b..86457f0 100644 --- a/install_functions/wazuh-offline-installation.sh +++ b/install_functions/wazuh-offline-installation.sh @@ -14,14 +14,11 @@ function offline_checkPrerequisites(){ dependencies=( "${@}" ) if [ $1 == "wia_offline_dependencies" ]; then dependencies=( "${@:2}" ) - fi - - if [ $1 == "wia_offline_dependencies" ]; then common_logger "Checking dependencies for Wazuh installation assistant." - else common_logger "Checking prerequisites for Offline installation." fi + for dep in "${dependencies[@]}"; do if [ "${sys_type}" == "yum" ]; then eval "yum list installed 2>/dev/null | grep -q -E ^"${dep}"\\."