]> git.sur5r.net Git - bacula/bacula/blob - bacula/examples/conf/m4.additions
dhb Fix of a segfault. The clear() function would execute triggering
[bacula/bacula] / bacula / examples / conf / m4.additions
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
5
6 Hi !
7
8 On Fri, May 21, 2004 at 11:24:13AM +0200, Peter Eriksson wrote:
9
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.
13
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.
18
19 > [See the attached files for details. They can be expanded
20 > a lot though, it's just a beginning]
21
22 Many thanks for the files!  
23
24 I adopted this way now - and it works with good results :-)
25
26 The different client-definitions can now be placed on distributed
27 locations.
28
29 Look at the make-target below :
30 --
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
37 --
38
39
40 Best regards
41
42 Marc Schoechlin
43