move xenserver/xcp-ng host check inside it's own function

This commit is contained in:
ronivay
2021-05-03 15:09:58 +03:00
parent 1f7e0d1a75
commit 3cff98848d

View File

@@ -919,6 +919,15 @@ function CheckOS {
} }
function CheckXE {
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
}
function CheckArch { function CheckArch {
if [[ "$ARCH_CHECK" != "true" ]]; then if [[ "$ARCH_CHECK" != "true" ]]; then
@@ -1101,6 +1110,7 @@ CheckUser
CheckArch CheckArch
CheckOS CheckOS
CheckSystemd CheckSystemd
CheckXE
CheckCertificate CheckCertificate
if [[ $# != "0" ]]; then if [[ $# != "0" ]]; then