fix centos version check and log pkg manager checks

This commit is contained in:
ronivay
2021-05-03 15:26:20 +03:00
parent 3cff98848d
commit bb7c523ddf

View File

@@ -876,11 +876,13 @@ function RollBackInstallation {
function CheckOS {
if [[ "$(which yum)" ]]; then
cmdlog "which yum"
if [[ "$(which yum 2>>$LOGFILE)" ]]; then
PKG_FORMAT="rpm"
fi
if [[ "$(which apt-get)" ]]; then
cmdlog "which apt-get"
if [[ "$(which apt-get 2>>$LOGFILE)" ]]; then
PKG_FORMAT="deb"
fi
@@ -896,7 +898,7 @@ function CheckOS {
exit 1
fi
if [[ $OSNAME == "CentOS" ]] && [[ ! $OSVERSION != "8" ]]; then
if [[ $OSNAME == "CentOS" ]] && [[ $OSVERSION != "8" ]]; then
printfail "Only CentOS 8 supported"
exit 1
fi