1 From: Marc Schoechlin <ms@LF.net>
2 To: Peter Eriksson <peter@ifm.liu.se>
3 Cc: bacula-users@lists.sourceforge.net
4 Subject: Re: [Bacula-users] RE: Feature Request : includes for config-files
8 On Fri, May 21, 2004 at 11:24:13AM +0200, Peter Eriksson wrote:
10 > > I think that is the 99%-solution for this problem -
11 > > but I think many users would be happy with a 90%-solution, which
12 > > allows to store configuration-data in distributed files.
14 > Or you could do as I just did - generate the configuration
15 > files using a Makefile and the m4 macro processor... That way you
16 > don't have to reinvent the wheel again inside Bacula but can delegate
17 > the tasks to external programs.
19 > [See the attached files for details. They can be expanded
20 > a lot though, it's just a beginning]
22 Many thanks for the files!
24 I adopted this way now - and it works with good results :-)
26 The different client-definitions can now be placed on distributed
29 Look at the make-target below :
31 $(ETCDIR)/bacula-dir.conf: bacula-dir.conf bacula-defs.m4
32 cat bacula-dir.conf > $(ETCDIR)/bacula-dir.conf.tmp && \
33 $(FIND) $(CUSTOMERS) -name "*.cfg" -exec cat {} >> $(ETCDIR)/bacula-dir.conf.tmp \; && \
34 $(M4) $(ETCDIR)/bacula-dir.conf.tmp >$(ETCDIR)/bacula-dir.tmp && \
35 $(DIR) -t -c $(ETCDIR)/bacula-dir.tmp && \
36 mv $(ETCDIR)/bacula-dir.tmp $(ETCDIR)/bacula-dir.conf