[collectd] Variables in collectd.conf

Yves Mettier ymettier at free.fr
Wed Apr 10 14:30:18 CEST 2013


Hello,

Probably useful. I like it.

Regards,
Yves

Le 2013-04-09 22:23, Dan Fandrich a écrit :
> Any comments on this patch?
>
>>>> Dan
>
> The default collectd.conf file created for me by autoconf from the
> collectd.conf.in file contains this for the first four entries with 
> variable
> substitutions:
>
> #BaseDir     "${prefix}/var/lib/collectd"
> #PIDFile     "${prefix}/var/run/collectd.pid"
> #PluginDir   "${exec_prefix}/lib/collectd"
> #TypesDB     "/usr/local/share/collectd/types.db"
>
> That is, all but the last contains variable references like
> ${prefix}. Needless to say, collectd doesn't expand these references
> and it ends up creating files in directories named literally
> "${prefix}". Looking at the autoconf output, it appears that all 
> autoconf
> substitution variables except for @prefix@ do this, and some (like
> @execdir@) go through two levels of variable indirection.
>
> It looks like this is by design, as the autoconf documentation says
> "...you should not use these variables except in makefiles". The 
> workaround
> they suggest is to use sed to do the variable substitution manually 
> for each
> desired variable, instead of using AC_CONFIG_FILES.
>
> The attached patch changes collectd to use the specified method of 
> replacing
> the directory variables.
>
>>>> Dan
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> http://mailman.verplant.org/listinfo/collectd
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> http://mailman.verplant.org/listinfo/collectd

-- 
- Homepage       - http://ymettier.free.fr                             
-
- GPG key        - http://ymettier.free.fr/gpg.txt                     
-
- C en action    - http://ymettier.free.fr/livres/C_en_action_ed2.html 
-
- Guide Survie C - http://www.pearson.fr/livre/?GCOI=27440100673730    
-



More information about the collectd mailing list