diff options
Diffstat (limited to 'daemon/system-info.sh')
-rwxr-xr-x | daemon/system-info.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/daemon/system-info.sh b/daemon/system-info.sh index 12553e3d..101ccb0b 100755 --- a/daemon/system-info.sh +++ b/daemon/system-info.sh @@ -44,9 +44,11 @@ if [ -z "${VIRTUALIZATION}" ]; then [ -n "$VIRTUALIZATION" ] && VIRT_DETECTION="dmidecode" fi - if [ -z "${VIRTUALIZATION}" ] && [ "${KERNEL_NAME}" = "FreeBSD" ]; then - VIRTUALIZATION=$(sysctl kern.vm_guest 2>/dev/null | cut -d: -f 2 | awk '{$1=$1};1') - [ -n "$VIRTUALIZATION" ] && VIRT_DETECTION="sysctl" + if [ -z "${VIRTUALIZATION}" ] || [ "$VIRTUALIZATION" = "unknown" ]; then + if [ "${KERNEL_NAME}" = "FreeBSD" ]; then + VIRTUALIZATION=$(sysctl kern.vm_guest 2>/dev/null | cut -d: -f 2 | awk '{$1=$1};1') + [ -n "$VIRTUALIZATION" ] && VIRT_DETECTION="sysctl" + fi fi if [ -z "${VIRTUALIZATION}" ]; then @@ -336,7 +338,7 @@ if [ "${KERNEL_NAME}" = FreeBSD ]; then TOTAL_RAM="$(sysctl -n hw.physmem)" elif [ "${KERNEL_NAME}" = Darwin ]; then RAM_DETECTION="sysctl" - TOTAL_RAM="$(sysctl -n hw.physmem)" + TOTAL_RAM="$(sysctl -n hw.memsize)" elif [ -r /proc/meminfo ]; then RAM_DETECTION="procfs" TOTAL_RAM="$(grep -F MemTotal /proc/meminfo | cut -f 2 -d ':' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | cut -f 1 -d ' ')" |