git: 8f9a376fdfe9 - main - emulators/open-vm-tools: Fix vmware-guestd rc

From: Renato Botelho <garga_at_FreeBSD.org>
Date: Mon, 03 Oct 2022 17:55:22 UTC
The branch main has been updated by garga:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8f9a376fdfe9dc5fb43ba5f04aaba303393633c2

commit 8f9a376fdfe9dc5fb43ba5f04aaba303393633c2
Author:     Geoff Davis <gadavis@ucsd.edu>
AuthorDate: 2022-10-03 17:51:41 +0000
Commit:     Renato Botelho <garga@FreeBSD.org>
CommitDate: 2022-10-03 17:55:12 +0000

    emulators/open-vm-tools: Fix vmware-guestd rc
    
    Add eval to the call to ${checkvm_cmd} to make sure stdout/stderr are
    redirect to /dev/null and remove spurious output when it's executed
    
    PR:             266520
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 emulators/open-vm-tools/Makefile               | 1 +
 emulators/open-vm-tools/files/vmware-guestd.in | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/emulators/open-vm-tools/Makefile b/emulators/open-vm-tools/Makefile
index 1539f3fee5c3..bce1166d3214 100644
--- a/emulators/open-vm-tools/Makefile
+++ b/emulators/open-vm-tools/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	open-vm-tools
 PORTVERSION=	12.1.0
 DISTVERSIONPREFIX=	stable-
+PORTVERSION=	1
 PORTEPOCH=	2
 CATEGORIES=	emulators
 
diff --git a/emulators/open-vm-tools/files/vmware-guestd.in b/emulators/open-vm-tools/files/vmware-guestd.in
index 99235082d679..f7aca835fbff 100644
--- a/emulators/open-vm-tools/files/vmware-guestd.in
+++ b/emulators/open-vm-tools/files/vmware-guestd.in
@@ -18,7 +18,7 @@ rcvar=vmware_guestd_enable
 load_rc_config $name
 
 checkvm_cmd="%%PREFIX%%/bin/vmware-checkvm > /dev/null 2>&1"
-if ${checkvm_cmd}; then
+if eval "${checkvm_cmd}"; then
 	: ${vmware_guestd_enable:="YES"}
 else
 	: ${vmware_guestd_enable:="NO"}