[Bug 261747] www/uwsgi: etc/rc.d/uwsgi only be verbose when it is a terminal to prev ent puppet7’s rcvar test choking on it

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 06 Feb 2022 15:21:05 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261747

            Bug ID: 261747
           Summary: www/uwsgi: etc/rc.d/uwsgi only be verbose when it is a
                    terminal to prevent puppet7’s rcvar test choking on it
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: ruben@verweg.com
                CC: eugene@zhegan.in
             Flags: maintainer-feedback?(eugene@zhegan.in)
                CC: eugene@zhegan.in

Created attachment 231578
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=231578&action=edit
[PATCH] Only output when it is a terminal. This prevents puppet7's  rcvar test
choking on it

Puppet7 uses service $svcname rcvar to check whether it is enabled.

The unpatched uwsgi rc.d script adds some verbose information that confuses
this check

$ service uwsgi rcvar
Processing uwsgi profile: puppetboard
# uwsgi
#
uwsgi_enable="YES"
#   (default: "")

The patch attached prevents verbose echo’ing if there is no terminal

$ service uwsgi rcvar < /dev/null | cat
# uwsgi
#
uwsgi_enable="YES"
#   (default: "")

With a terminal, old behaviour

$ service uwsgi rcvar 
Processing uwsgi profile: puppetboard
# uwsgi
#
uwsgi_enable="YES"
#   (default: "")

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