From 3c7f2688d1e2bc425394b8f86bd154817ebea2b0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 20 Dec 2021 23:46:10 +0000 Subject: [PATCH] warning will run every time check_deps is run space word comment --- lgsm/functions/check_deps.sh | 13 ++++++------- lgsm/functions/info_distro.sh | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index a48a1d670..38241dc5a 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -592,13 +592,11 @@ fn_deps_build_redhat(){ array_deps_required+=( hostname ) fi fi - fn_deps_email fn_check_loop } if [ "${commandname}" == "INSTALL" ]; then - if [ "$(whoami)" == "root" ]; then echo -e "" echo -e "${lightyellow}Checking Dependencies as root${default}" @@ -611,12 +609,13 @@ if [ "${commandname}" == "INSTALL" ]; then echo -e "${lightyellow}Checking Dependencies${default}" echo -e "=================================" fi - if [ "${distrosupport}" == "supported" ]||[ "${distrosupport}" == "unsupported" ]; then - if [ "${distrosupport}" == "unsupported" ]; then - fn_print_warning_nl "${distroname} is no longer supported. Upgrading is reccomended." - else +fi - fi +# Will warn user if their distro is no longer supported by the vendor. +if [ -n "${distrosupport}" ]; then + if [ "${distrosupport}" == "unsupported" ]; then + fn_print_warning_nl "${distroname} is no longer supported by the vendor. Upgrading is recommended." + fn_script_log_warn "${distroname} is no longer supported by the vendor. Upgrading is recommended." fi fi diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 31298d71a..3c9ca0c08 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -70,7 +70,7 @@ for distro_info in "${distro_info_array[@]}"; do fi done -# Check if distro supported by distro developer. +# Check if distro supported by distro vendor. if [ "$(command -v distro-info 2>/dev/null)" ]; then distrosunsupported="$(distro-info --unsupported)" distrosunsupported_array=( "${distrosunsupported}" )