DistroInventory fixed Windows systems printing twice
This commit is contained in:
@@ -43,7 +43,6 @@ if $CheckVM; then
|
|||||||
if [[ $OSYPE == *"win"* ]]; then
|
if [[ $OSYPE == *"win"* ]]; then
|
||||||
DISTRO=Windows
|
DISTRO=Windows
|
||||||
VERSION=$(qm guest exec $ID "systeminfo" |jq -r '.["out-data"]'| grep "OS Name" |sed -e 's/OS Name://' -e 's/^[ \t]*//' -e 's/Microsoft Windows//' -e 's/^[ \t]*//')
|
VERSION=$(qm guest exec $ID "systeminfo" |jq -r '.["out-data"]'| grep "OS Name" |sed -e 's/OS Name://' -e 's/^[ \t]*//' -e 's/Microsoft Windows//' -e 's/^[ \t]*//')
|
||||||
echo "$TYPE,$ID,$NAME,$STATUS,$DISTRO,$VERSION" | tee -a $InventoryFile
|
|
||||||
else
|
else
|
||||||
OSRELEASE=$(qm guest exec $ID -- cat /etc/os-release |jq -r '.["out-data"]')
|
OSRELEASE=$(qm guest exec $ID -- cat /etc/os-release |jq -r '.["out-data"]')
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user