On Wednesday 02 May 2007 16:56, David Boyes wrote:
> > I have no problems with putting the bacula conf files in to the
> database
> > if
> > someone wants to do so.  However, I don't foresee any change in the
> ASCOO
> > format that Bacula requires -- i.e. I don't foresee Bacula reading its
> > conf
> > file directly from an SQL database.
> 
> Fair enough. 
> 
> Thinking out loud about how to implement this: would you consider a
> directive that specified a script to be run whenever a Bacula component
> needed to open or reference the config file that would supply the name
> of a file to read for the information? The idea would be similar to the
> pre-run script for the FD, but applied to the Bacula daemons, and
> invoked as part of the read-config-file step.

If I understand it correctly, it seems to me that  your request is already 
covered by Jorj's Feature request/patch.  See below.

> 
> That way, the "official" location for the config file could contain only
> the information to find the config-generator script, and a directive to
> activate the "dynamic config" option. That config file could trivially
> be replicated for systems with the ability to do substantial R/O sharing
> of filesystems. 

Since he has implemented it as an enhancement of the conf file specification 
at the lexically scanner level, it will apply to *all* Bacula components that 
accept the -c option, which is every component (or tool) that needs a conf 
file.

This feature will go in shortly, but probably not for 2.2.0 unless I get lucky 
on fixing some of the Win32 bugs ...


[Bacula-devel] Feature request: dynamic configuration files
 Date: 2007-03-19 14:59
 From: Jorj Bauer <[EMAIL PROTECTED]>
 To: [EMAIL PROTECTED], bacula-users@lists.sourceforge.net
 
What: The ability to read a configuration file as stdout from an executable

Why: The configuration files (particularly for the Director) are very
        complex. In my case I find it easier to have a program generate them
        from meta-information about the clients.

Notes:

The attached patch implements this. It's a simple change to lex.c, and
functions globally: if the first character of any configuration file's
name is a pipe ("|"), then the rest of the "filename" is considered to
be the path to an executable. The program is run, stdout is read, and
the output is the configuration file.

For example, starting the director like this:

        # bacula-dir -c '|/usr/local/sbin/generate-dir-config'

... would cause it to run /usr/local/sbin/generate-dir-config to
generate a new configuration file.

Comments welcome.

-- Jorj

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to