Re: wanted: m4 macros to generate mutliple similar config files
>>>>> "Andreas" == Andreas Schuldei <andreas@schuldei.org> writes:
Andreas> I am looking for an example of m4 makros to generate a
Andreas> hole set of similar configuration files (for isakmpd) for
Andreas> several hosts.
Andreas> Basicly in the resulting config fiels are very similar
Andreas> for all hosts and are a permutation of the involved host.
Andreas> but that is not the point, basicly I am looking for m4
Andreas> makros which read an input file and create several
Andreas> similar output files.
Have a look at my diskless-image-* packages. They use m4 extensively
(/usr/lib/diskless-image/template/**/*).
Note these packages shouldn't be installed on a normal computer though
- the intention being that they should only be installed on NFS-root
images instead.
So, either have a look at the source to diskless or manually extract
it to a directory with dpkg -X.
I also have a more sophisticated set of macros for my LaTeX files, but
suspect this might be an overkill for your requirements.
Note: You will have to call m4 for each host. You can use -D to define
the values on the command line.
--
Brian May <bam@debian.org>
Reply to: