cloudron-support: handle systemd-detect-virt error

This commit is contained in:
Girish Ramakrishnan
2025-12-09 16:06:13 +01:00
parent 1cac67d4c5
commit 854f7d7f2e

View File

@@ -631,7 +631,7 @@ function print_system() {
echo "Ubuntu: ${ubuntu_codename} ${ubuntu_version}"
proc_count=$(grep -c ^processor /proc/cpuinfo)
proc_name=$(lscpu | grep "Model name:" | sed -r 's/Model name:\s{1,}//g')
env_type=$(systemd-detect-virt) # systemd-detect-virt --list gives all the possible options
env_type=$(systemd-detect-virt || echo none) # systemd-detect-virt --list gives all the possible options
echo "Execution environment: ${env_type}"
echo "Processor: ${proc_name} x ${proc_count}"
ram_kb=$(grep MemTotal /proc/meminfo | awk '{print $2}')