From 4c9f1124b19212870f27cea9066e8f1ea7c89baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roni=20V=C3=A4yrynen?= Date: Wed, 15 Sep 2021 11:55:20 +0300 Subject: [PATCH] add check that prevents xo-install.sh to be ran on official XOA VM --- xo-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xo-install.sh b/xo-install.sh index 91b9989..6b03441 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -929,6 +929,12 @@ function CheckOS { OSVERSION=$(runcmd_stdout "grep ^VERSION_ID /etc/os-release | cut -d'=' -f2 | grep -Eo '[0-9]{1,2}' | head -1") OSNAME=$(runcmd_stdout "grep ^NAME /etc/os-release | cut -d'=' -f2 | sed 's/\"//g' | awk '{print \$1}'") + # check that were not on official XOA VM. if yes, bail out + if [[ $(runcmd_stdout "grep ^GRUB_DISTRIBUTOR /etc/default/grub | grep 'Xen Orchestra'") ]]; then + printfail "Looks like this is the official XOA VM. Installation not supported, exiting" + exit 1 + fi + if [[ $(runcmd_stdout "command -v yum") ]]; then PKG_FORMAT="rpm" fi