From 1b78bdae3980a595aa389978e31e40d8b043736d Mon Sep 17 00:00:00 2001 From: Ravindra Kumar Date: Mon, 20 Jun 2016 12:44:40 -0700 Subject: [PATCH] Use systemd-detect-virt to detect VMware platform (RHBZ#1251656) --- open-vm-tools.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/open-vm-tools.spec b/open-vm-tools.spec index a986965..c977634 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -28,7 +28,7 @@ Name: open-vm-tools Version: %{toolsversion} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open Virtual Machine Tools for virtual machines hosted on VMware Group: Applications/System License: GPLv2 @@ -190,8 +190,11 @@ if [ -f %{_bindir}/vmware-guestproxycerttool ]; then fi # Setup mount point for Shared Folders +# NOTE: Use systemd-detect-virt to detect VMware platform because +# vmware-checkvm might misbehave on non-VMware platforms. if [ -f %{_bindir}/vmware-checkvm -a \ -f %{_bindir}/vmhgfs-fuse ] && \ + %{_bindir}/systemd-detect-virt | grep -iq VMware && \ %{_bindir}/vmware-checkvm &> /dev/null && \ %{_bindir}/vmware-checkvm -p | grep -q Workstation && \ %{_bindir}/vmhgfs-fuse -e &> /dev/null; then @@ -206,8 +209,9 @@ fi %systemd_preun %{toolsdaemon}.service %systemd_preun %{vgauthdaemon}.service -if [ "$1" = "0" -a \ - -f %{_bindir}/vmware-checkvm ] && \ +if [ "$1" = "0" -a \ + -f %{_bindir}/vmware-checkvm ] && \ + %{_bindir}/systemd-detect-virt | grep -iq VMware && \ %{_bindir}/vmware-checkvm &> /dev/null; then # Tell VMware that open-vm-tools is being uninstalled @@ -293,6 +297,9 @@ fi %{_libdir}/libvmtools.so %changelog +* Mon Jun 20 2016 Ravindra Kumar - 10.0.5-3 +- Use systemd-detect-virt to detect VMware platform (RHBZ#1251656). + * Wed May 25 2016 Ravindra Kumar - 10.0.5-2 - Obsolete open-vm-tools-deploypkg because its not needed for v10.x.