Bug 397671

Summary: monit don't start because of configure variables left in initscript file
Product: [Fedora] Fedora Reporter: Peter Bieringer <pb>
Component: monitAssignee: Stewart Adam <s.adam>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.10.1-4.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-26 18:44:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Bieringer 2007-11-24 10:19:38 UTC
Description of problem:
monit don't start because there are still some configure variables left in
initscript file

Version-Release number of selected component (if applicable):
monit-4.10.1-3.fc8


Workaround: manual fix

--- /etc/init.d/monit.orig      2007-11-14 00:54:21.000000000 +0100
+++ /etc/init.d/monit   2007-11-24 11:13:11.000000000 +0100
@@ -18,12 +18,12 @@
 # FIXME: Should we also use /var/run/${prog}.pid?
 
 ### Default variables
-CONFIG="%{_sysconfdir}/monit.conf"
+CONFIG="/etc/monit.conf"
 prog="monit"
 desc="process monitor"
 
 # Check if requirements are met
-[ -x %{_bindir}/monit ] || exit 1
+[ -x /usr/bin/monit ] || exit 1
 [ -r "$CONFIG" ] || exit 1
 
 RETVAL=0

Comment 1 Stewart Adam 2007-11-24 13:57:50 UTC
Thanks for the report (and patch) - I'm building the package which includes the
fix now.

Comment 2 Peter Bieringer 2007-11-24 14:03:58 UTC
I don't believe, adding my patch would be the proper solution...looks like there
is a problem in the build script somewhere, so better to parse the
/etc/init.d/monit file during build process and replace the variable with the
related content - if there is no better way to fix this problem.

Comment 3 Stewart Adam 2007-11-24 14:25:02 UTC
No, it was a stupid mistake on my part - I had based this monit package from an
older dries package, which used `echo [monit.conf] >
%{_sysconfdir}/init.d/monit`. I had copy/pasted the script to package it into
separate file as Source1 without thinking to replace the macros.

Comment 4 Fedora Update System 2007-11-26 18:37:25 UTC
monit-4.10.1-4.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2007-11-26 18:44:27 UTC
monit-4.10.1-4.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.