Skip to content

Commit

Permalink
Merge pull request #3002 from wazuh/change/2879-installation-assistan…
Browse files Browse the repository at this point in the history
…t-must-ask-for-confirmation-before-installing-dependencies

Dependencies installation is reworked in Installation assistant
  • Loading branch information
c-bordon authored Jun 18, 2024
2 parents 10d79c7 + b635412 commit b818579
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 229 deletions.
24 changes: 8 additions & 16 deletions unattended_installer/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 @@ -377,18 +380,7 @@ function checks_specifications() {
}

function checks_ports() {

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


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

0 comments on commit b818579

Please sign in to comment.