Hi, On Sat, Aug 14, 2010 at 09:13:31AM +0200, Florian Forster wrote: > On Fri, Aug 13, 2010 at 05:46:52PM +0200, Reinhard Tartler wrote: > > In the lenny version, this worked just fine and collectd continued to > > work. In squeeze, collectd fails to start with this error message: > > > > Restarting statistics collection and monitoring daemon: > > collectdconfigfile: stat (/etc/collectd/conf.d/*.conf) failed: No such > > file or directoryconfigfile: stat (/etc/collectd/conf.d/*.conf) > > failed: No such file or directory.
After double-checking this, the daemon should report that error but continue to run, both in versions 4.4 and 4.9 as well as current master. I've tried that using 4.9.1-2~bpo50+1 on amd64. (The code handling "Include" ignores an error reported by the function parsing the config file.) That error might be a bit misleading, though. This could be fixed by letting the "Include" code return a message telling the user that the file is ignored. > the code in question uses the wordexp(3) function to do a shell-like > pattern expansion. Like the shell, the expansion only takes place if a > file actually matches the pattern, otherwise the argument / pattern is > passed on / returned as is. Unfortunately, as far as I can see, no > indication of this condition is given. I couldn't find anything like that either :-/ > So the described behavior is expected and has been like this since the > feature was introduced in version 4.3 (Lenny features 4.4.2-3). If you > have any idea how I could detect a "pattern not found" condition, please > let me know. Well, in case wordexp() returned a single "match" and that file does not exist and the filename includes any of the characters '*', '?' or '[' (wordexp() should return an error already, if there is an unmatched bracket, I presume) and if that character is not escaped, that file could be ignored. Not quite sure if that's worth the effort, though, and I suppose it does not really match the behavior of other software. > The only idea why the Lenny package behaved differently I can come up > with right now is, if the Lenny package shipped a file matching that > pattern. A quick look at the files in the 4.4.2-3 package doesn't > support this thesis though. I suppose that with version 4.4 that error did not show up on stdout/ stderr. Cheers, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
signature.asc
Description: Digital signature

