Bug 266520 - emulators/open-vm-tools rcvars outputs spurious line from vmware-checkvm
Summary: emulators/open-vm-tools rcvars outputs spurious line from vmware-checkvm
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Renato Botelho
URL:
Keywords:
: 266694 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-20 15:11 UTC by Geoff Davis
Modified: 2022-10-03 17:56 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (garga)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff Davis 2022-09-20 15:11:00 UTC
This appears to be a regression from a change mentioned offhand in bug #264564.

Redirection of stdout and stderr fails, so there's spurious output, which is breaking Puppet management of the service.

Expected:

    # vmware_guestd
    #
    vmware_guestd_enable="YES"
    #   (default: "")

Actual:

    VMware software version 6 (good)
    # vmware_guestd
    #
    vmware_guestd_enable="YES"
    #   (default: "")

Replacing line 21 of /usr/local/etc/rc.d/vmware-guestd with the following fixes the issue:

    --- /usr/local/etc/rc.d/vmware-guestd	2022-09-19 08:19:45.000000000 -0700
    +++ ./vmware-guestd	2022-09-20 08:06:56.469558000 -0700
    @@ -18,7 +18,7 @@
     load_rc_config $name
    
     checkvm_cmd="/usr/local/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"}


Other info:

    $ pkg info open-vm-tools | grep Version
    Version        : 12.1.0,2
    $ uname -r
    13.1-RELEASE-p2
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-10-03 17:55:29 UTC
A commit in branch main references this bug:

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(-)
Comment 2 Renato Botelho freebsd_committer freebsd_triage 2022-10-03 17:55:46 UTC
*** Bug 266694 has been marked as a duplicate of this bug. ***