Skip to content

Commit

Permalink
Merge pull request #90 from wazuh/change/wazuh-packages-PR-3002
Browse files Browse the repository at this point in the history
Dependencies installation is reworked in Installation assistant.
  • Loading branch information
c-bordon authored Sep 30, 2024
2 parents 5fb2bec + 9f3c5d0 commit 536bde3
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 249 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.

### Changed

- Dependencies installation is reworked in Installation assistant. ([#90](https://github.com/wazuh/wazuh-installation-assistant/pull/90))
- Change apt to dpkg for better performance. ([#89](https://github.com/wazuh/wazuh-installation-assistant/pull/89))
- Added check when generating certificates for multiple DNS. ([#88](https://github.com/wazuh/wazuh-installation-assistant/pull/88))
- Change cert-tool to use only one wazuh-certificates folder. ([#87](https://github.com/wazuh/wazuh-installation-assistant/pull/87))
Expand Down
24 changes: 7 additions & 17 deletions install_functions/checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,11 @@ function check_dist() {
if [ "${DIST_NAME}" == "centos" ] && { [ "${DIST_VER}" -ne "7" ] && [ "${DIST_VER}" -ne "8" ]; }; then
notsupported=1
fi
if [ "${DIST_NAME}" == "rhel" ] && { [ "${DIST_VER}" -ne "7" ] && [ "${DIST_VER}" -ne "8" ] && [ "${DIST_VER}" -ne "9" ]; }; then
notsupported=1
if [ "${DIST_NAME}" == "rhel" ]; then
if [ "${DIST_VER}" -ne "7" ] && [ "${DIST_VER}" -ne "8" ] && [ "${DIST_VER}" -ne "9" ]; then
notsupported=1
fi
need_centos_repos=1
fi

if [ "${DIST_NAME}" == "amzn" ]; then
Expand Down Expand Up @@ -361,11 +364,11 @@ function checks_previousCertificate() {
function checks_specialDepsAL2023() {

# Change curl for curl-minimal
wia_yum_dependencies=( "${wia_yum_dependencies[@]/curl/curl-minimal}" )
assistant_yum_dependencies=( "${assistant_yum_dependencies[@]/curl/curl-minimal}" )

# In containers, coreutils is replaced for coreutils-single
if [ -f "/.dockerenv" ]; then
wia_yum_dependencies=( "${wia_yum_dependencies[@]/coreutils/coreutils-single}" )
assistant_yum_dependencies=( "${assistant_yum_dependencies[@]/coreutils/coreutils-single}" )
fi
}

Expand All @@ -378,19 +381,6 @@ function checks_specifications() {

function checks_ports() {

if [ -z "${offline_install}" ]; then
dep="lsof"
if [ "${sys_type}" == "yum" ]; then
installCommon_yumInstallList "${dep}"
elif [ "${sys_type}" == "apt-get" ]; then
installCommon_aptInstallList "${dep}"
fi

if [ "${#not_installed[@]}" -gt 0 ]; then
wia_dependencies_installed+=("${dep}")
fi
fi

common_logger -d "Checking ports availability."
used_port=0
ports=("$@")
Expand Down
Loading

0 comments on commit 536bde3

Please sign in to comment.