[Bug 266520] emulators/open-vm-tools rcvars outputs spurious line from vmware-checkvm

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 20 Sep 2022 15:11:00 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266520

            Bug ID: 266520
           Summary: emulators/open-vm-tools rcvars outputs spurious line
                    from vmware-checkvm
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: garga@FreeBSD.org
          Reporter: gadavis@ucsd.edu
             Flags: maintainer-feedback?(garga@FreeBSD.org)
          Assignee: garga@FreeBSD.org

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

-- 
You are receiving this mail because:
You are the assignee for the bug.