monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hard coded locations for monitrc


From: Klaus Heinz
Subject: Re: hard coded locations for monitrc
Date: Wed, 18 Apr 2007 23:44:19 +0200

Martin Pala wrote:

> However - because of backward compatibility we should probably keep the 
> /usr/local/etc in the search path as well, otherwise it may break some 
> existing monit installations which rely on it (although the sysconfigdir 
> may have higher priority). The search path should be checked for 

Up to now, specifying --sysconfdir had no effect at all because not a single
file contained "@sysconfdir@", so I doubt anyone could have used it
successfully.

Anyone building monit from source and using --sysconfdir probably know
what they are doing: no compatibility issue.

As far as I can see, the only case where backwards compatibility could
be an issue would be for someone using a binary package from some
distributor who either used --sysconfdir=/some/directory in the past
(with no effect) or will do so in the future. Thus, with the proposed
changes a new binary package of monit from this distributor would
require /some/directory/monitrc instead of /usr/local/etc/monitrc.

Is this really a case the monit team should worry about? IMHO, this lies
entirely in the domain of the distributor.

> may have higher priority). The search path should be checked for 
> redundancy (i.e ignore the sysconfigdir in the case that it is equal to 
> some hardcoded path).

As it is now, there are four tests for ~/.monitrc,  /etc/monitrc,
/usr/local/etc/monitrc (to be replaced by SYSCONFDIR/monitrc) and
./monitrc.
The only redundancy I can think of would be a specification of
--sysconfdir=/etc. Would it really buy you much to add

  if (strcmp("/etc", SYSCONFDIR)) {
    ... check for SYSCONFDIR/monitrc ...
  }

?

ciao
     Klaus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]