[Bug 261747] www/uwsgi: rc: Only output when is it a terminal. Fixes puppet7’s rcv ar test

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 07 Feb 2022 10:44:12 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261747

--- Comment #2 from ruben@verweg.com ---
(In reply to Kubilay Kocak from comment #1)

It is not the puppet agent’s rc.d file, it happens when “ensuring” a service in
puppet.
Of course I could also write a patch to harden their rcvar check handling.
It currently doesn’t expect anything else than the rcvar value or comments.


sudo puppet apply -e 'service{ "uwsgi": enable=>false, ensure=>"stopped"}'
Notice: Compiled catalog for helium.niet.verweg.com in environment production
in 0.01 seconds
Error: /Stage[main]/Main/Service[uwsgi]: Could not evaluate: rcvar value is
empty
Notice: Applied catalog in 0.06 seconds


sudo puppet apply —debug -e 'service{ "uwsgi": enable=>false,
ensure=>"stopped"}'
…
Debug: Facter: fact "operatingsystem" has resolved to: FreeBSD 
Debug: Service[uwsgi](provider=freebsd): Could not find uwsgi in /etc/rc.d
Debug: Executing: '/usr/local/etc/rc.d/uwsgi onestatus'
Debug: Executing: '/usr/local/etc/rc.d/uwsgi rcvar'
Error: /Service[uwsgi]: Could not evaluate: rcvar value is empty
Debug: Class[Main]: Resource is being skipped, unscheduling all events
Debug: Stage[main]: Resource is being skipped, unscheduling all events 
…

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