Skip to content

Commit

Permalink
Managed special dependencies for AL2023
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcr01 committed Jan 22, 2024
1 parent aa41eb2 commit 8c85381
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
16 changes: 16 additions & 0 deletions unattended_installer/install_functions/checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ function check_dist() {
fi
if [ "${DIST_NAME}" == "amzn" ] && [ "${DIST_VER}" -ne "2" ]; then
notsupported=1

if [ "${DIST_VER}" -eq "2023" ]; then
checks_specialDepsAL2023
fi
fi
if [ "${DIST_NAME}" == "ubuntu" ]; then
if [ "${DIST_VER}" == "16" ] || [ "${DIST_VER}" == "18" ] ||
Expand Down Expand Up @@ -338,6 +342,18 @@ function checks_previousCertificate() {
fi
}

# Manages the special dependencies in case of AL2023
function checks_specialDepsAL2023() {

# Change curl for curl-minimal
wia_yum_dependencies=( "${wia_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}" )
fi
}

function checks_specifications() {

cores=$(grep -c processor /proc/cpuinfo)
Expand Down
8 changes: 4 additions & 4 deletions unattended_installer/install_functions/installMain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,16 @@ function main() {

common_checkSystem

if [ -z "${download}" ]; then
check_dist
fi

if [ -z "${uninstall}" ] && [ -z "${offline_install}" ]; then
installCommon_installCheckDependencies
elif [ -n "${offline_install}" ]; then
offline_checkDependencies
fi

if [ -z "${download}" ]; then
check_dist
fi

common_checkInstalled
checks_arguments
if [ -n "${uninstall}" ]; then
Expand Down
2 changes: 1 addition & 1 deletion unattended_installer/install_functions/installVariables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ wazuh_aio_ports=( 9200 9300 1514 1515 1516 55000 "${http_port}")
readonly wazuh_indexer_ports=( 9200 9300 )
readonly wazuh_manager_ports=( 1514 1515 1516 55000 )
wazuh_dashboard_port="${http_port}"
readonly wia_yum_dependencies=( systemd grep tar coreutils sed procps-ng gawk lsof curl openssl )
wia_yum_dependencies=( systemd grep tar coreutils sed procps-ng gawk lsof curl openssl )
readonly wia_apt_dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl )
readonly wazuh_yum_dependencies=( libcap )
readonly wazuh_apt_dependencies=( apt-transport-https libcap2-bin software-properties-common gnupg )
Expand Down

0 comments on commit 8c85381

Please sign in to comment.