Differences between version 2 and previous revision of ConfigurationScripts.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 2 | Last edited on Monday, May 19, 2003 1:38:20 pm | by CraigBox | Revert |
Older page: | version 1 | Last edited on Monday, May 19, 2003 1:34:42 pm | by CraigBox | Revert |
@@ -2,8 +2,12 @@
m4(1) is the GNU macro processor. You may recognise it from such tools as autoconf(1) and sendmail(8). Here are some cool things you can do with it.
!config.m4
+
+This file will basically define our variables. We later include it in all our other files. The command ''divert'' is used to divert to a numbered temporary stream where you can reinsert it later. In this case, we dont want these commands to be inserted into any of our output files, because they are definitions. So we divert(-1), and they don't get displayed.
+
+The divert(0)dnl at the end returns to the main output without a line feed (DNL == do not linefeed.)
divert(-1)
define(conf_INTIF,`10.7.0.254')
define(conf_INTNET,`10.7.0.0')
@@ -45,9 +49,9 @@
address conf_INTIF
netmask conf_INTMASK
broadcast conf_INTBCAST
-And then
the m4 processor will go through the config.m4 file you have included (the dnl means 'do not linefeed'),
and generate a file like this:
+We include
the file we created before (with another DNL). The
m4 processor will go through the config.m4 file you have included and generate a file like this:
!interfaces (automatically generated by m4 with a simple 'make')
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)