On 21 Nov 2001 at 12:47, Gilles Detillieux wrote:
> According to Dan Langille:
> > I've found a situation wherein rundig will not rename the work files. I
> > think this is a side-effect of using a configuration file.
> >
> > Here's the command line:
> >
> > rundig -a -c /usr/local/etc/htdig-freebsddiary.org.conf
> >
> > Here's the files:
> >
> > $ ls /usr/local/share/htdig/*.work
> > /usr/local/share/htdig/freebsddiary.docdb.work
> > /usr/local/share/htdig/freebsddiary.wordlist.work
> > /usr/local/share/htdig/freebsddiary.docs.index.work
> > /usr/local/share/htdig/freebsddiary.words.db.work
> >
> > Within the conf file, I have this entry:
> >
> > database_base: ${database_dir}/freebsddiary
>
> The problem isn't so much a side-effect of using a configuration file,
> as it is a side-effect of changing database_base and/or database_dir
> in your config file. If you change database_dir, you should change
> DBDIR accordingly in rundig. If you change database_base, you should
> change the "db." string in the file name below...
I sounds like having a different rundig for each configuration file
makes sense.
> > The problem arises in this part of the file:
> >
> > ( cd $DBDIR && test -f db.docdb.work &&
> >
> > If that is changed to:
> >
> > ( cd $DBDIR &&
> >
> > The files are actually renamed.
> >
> > I can't think of a simple fix.
>
> There isn't really a simple fix, because there's no simple way of
> making rundig understand the config attributes in the given config
> file. So, you need to be consistent in your settings if you use
> rundig. You can remove the test above, as you did, but then you'll
> get a spurious error message if there are no .work files to move
> after a rundig that didn't dig anything.
Yep, one rundig per config file. Which makes sense anyways.
> > But perhaps adding a note to the
> > documentation and/or rundig itself until this is fixed...
> >
> > Or have I missed a simpler solution?
>
> The 3.1.6 and 3.2.0b4 snapshots finally document rundig, and include
> tips on customizing. I mentioned the problem of changing database_dir,
> but not database_base, so I should add a note about that.
Thank you. Much appreciated.
--
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html