systemd-detect-virt returns false when none detected

This commit is contained in:
Girish Ramakrishnan
2022-04-26 14:59:26 -07:00
parent 28b0043541
commit 67d29dbad8

View File

@@ -46,8 +46,7 @@ if [[ "$(uname -m)" != "x86_64" ]]; then
exit 1
fi
cvirt=$(systemd-detect-virt --container)
if [[ "${cvirt}" != "none" ]]; then
if cvirt=$(systemd-detect-virt --container); then
echo "Error: Cloudron does not support ${cvirt}, only runs on bare metal or with full hardware virtualization"
exit 1
fi