updated check to see if vm or not

This commit is contained in:
2021-02-27 09:48:50 -05:00
parent d562826c56
commit 1487c5782e

View File

@@ -14,14 +14,14 @@ fi
# get OS ditro and version
OS=$(hostnamectl | awk '/Operating System/ {print $3}')
VM=$(hostnamectl | awk '/Virtualization/ {print $2}')
Chassis=$(hostnamectl | awk '/Chassis/ {print $2}')
if [ "${OS}" == "Ubuntu" ]; then
OS_VER=$(hostnamectl | awk '/Operating System/ {print $4}')
else
OS_VER=$(hostnamectl | awk '/Operating System/ {print $5}')
fi
if [ "${VM}" == "vmware" ]; then
if [ "${Chassis}" == "vm" ]; then
VM="true"
else
VM="false"