
Feature request: dynamic configuration files
Attachments: novosirj.vcf
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andreas Helmcke wrote:
Jorj Bauer wrote:
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'
Maybe I am missing some important point, but by now I can't see any mayor
benefits of your solution compared with:
# /usr/local/sbin/generate-dir-config > /etc/bacula/bacula-dir.conf &&
bacula-dir -c /etc/bacula/bacula-dir.conf
I myself can't see the point of generate-dir-config. I know this is just
an example, but what might this script/program do that a flat file
can't? Maybe I'm missing something neat here, but I'm curious what one
would want to do with such a thing.
- --
---- _ _ _ _ ___ _ _ _
|Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Systems Programmer III
|$&| |__| | | |__/ | \| _| |novosirj < at > um... - 973/972.0922 (2-0922)
\__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iD8DBQFF/ztNmb+gadEcsb4RAoBeAKCotpTTgZ5pMnfhq2BpCJuYXkOfDACeOBaI
ROr4nFz3uKRyUYX3LiJwVAw=
=jYso
-----END PGP SIGNATURE-----