Bug 200775 - net-mgmt/nagios: Null rcvar value if default not set - Puppet can't detect Nagios service enable state
Summary: net-mgmt/nagios: Null rcvar value if default not set - Puppet can't detect Na...
Status: Closed Feedback Timeout
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Mathieu Arnold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-11 00:24 UTC by Joseph Mulloy
Modified: 2018-03-30 12:03 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Mulloy 2015-06-11 00:24:51 UTC
I tried to setup nagios with puppet and it fails to enable the service because when puppet runs '/usr/local/etc/rc.d/nagios rcvar' it gets the following output.

# nagios
#
nagios_enable=""
#   (default: "")

This is the error I get from puppet
Error: /Stage[main]/Nagios_server/Service[nagios]: Could not evaluate: rcvar value is empty

This issue is caused by the nagios rc script not setting a default value for nagios_enable. It should do this, but perhaps the rc system should detect this condition and print NO if the service won't start so that things like Puppet get a sensible response.
Comment 1 Romain Tartière freebsd_committer freebsd_triage 2017-04-21 07:16:21 UTC
Fix summary and assign to port's maintainer.
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2017-04-21 11:45:39 UTC
How did you manage to get an empty value ?

With it not being set:

# service nagios rcvar
# nagios
#
nagios_enable="NO"
#   (default: "")

With it being set to yes:

# service nagios rcvar
# nagios
#
nagios_enable="yes"
#   (default: "")