From 6eda5a94642bbeccb90e26c230ad4ce1c11f2f69 Mon Sep 17 00:00:00 2001 From: ronivay Date: Fri, 9 Oct 2020 09:08:40 +0300 Subject: [PATCH] refuse to run if OS is CentOS and xe binary is found (most likely xcp-ng/xenserver host) --- xo-install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xo-install.sh b/xo-install.sh index d59b5ab..d5e889f 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -811,6 +811,11 @@ function CheckOS { printfail "Only CentOS 7/8 supported" exit 0 fi + cmdlog "which xe" + if [[ $(which xe 2>>$LOGFILE) ]]; then + printfail "xe binary found, don't try to run install on xcp-ng/xenserver host. use xo-appliance.sh instead" + exit 1 + fi elif [[ -f /etc/os-release ]]; then OSVERSION=$(grep ^VERSION_ID /etc/os-release | cut -d'=' -f2 | grep -Eo "[0-9]{1,2}" | head -1) OSNAME=$(grep ^NAME /etc/os-release | cut -d'=' -f2 | sed 's/"//g' | awk '{print $1}')