Browse Source

initial commit for unsupported check

pull/3723/head
Daniel Gibbs 4 years ago
parent
commit
3265e200d3
  1. 8
      lgsm/functions/check_deps.sh
  2. 17
      lgsm/functions/info_distro.sh

8
lgsm/functions/check_deps.sh

@ -598,6 +598,7 @@ fn_deps_build_redhat(){
}
if [ "${commandname}" == "INSTALL" ]; then
if [ "$(whoami)" == "root" ]; then
echo -e ""
echo -e "${lightyellow}Checking Dependencies as root${default}"
@ -610,6 +611,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
fi
# Filter checking in to Debian or Red Hat Based.

17
lgsm/functions/info_distro.sh

@ -70,6 +70,23 @@ for distro_info in "${distro_info_array[@]}"; do
fi
done
# Check if distro supported by distro developer.
if [ "$(command -v distro-info 2>/dev/null)" ]; then
distrosunsupported="$(distro-info --unsupported)"
distrosunsupported_array=( "${distrosunsupported}" )
for distrounsupported in "${distrosunsupported_array[@]}"; do
if [ "${distrounsupported}" == "${distrocodename}" ]; then
distrosupport=unsupported
break
else
distrosupport=supported
fi
done
else
distrosupport=unknown
fi
echo "${distrosupport}"
## Glibc version
# e.g: 1.17
glibcversion=$(ldd --version | sed -n '1s/.* //p')

Loading…
Cancel
Save