From bb7c523ddf91a5f1b20aa08b1c587110573e396c Mon Sep 17 00:00:00 2001 From: ronivay Date: Mon, 3 May 2021 15:26:20 +0300 Subject: [PATCH] fix centos version check and log pkg manager checks --- xo-install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xo-install.sh b/xo-install.sh index ea9b7c9..f835d9a 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -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