Personal tools

Mappings are applied iteratively (page 332)

Document Actions

When the second paragraph in the subsection "Interface mappings" in section 6.7.1 states that only the first matching mapping is applied, it is only partially correct. Mappings are applied iteratively until no further mappings match.

Discussion

It is true that a configuration identifier is mapped by the first matching mapping stanza; mapping stanzas further down in the file are not applied.

However, the result of a mapping is another configuration identifier. After applying a mapping, ifupdown repeats the process and tries to find the first mapping whose glob matches the new configuration identifier. This process continues until no more matching mapping stanzas are available, at which point the iface stanzas are considered.

This allows for interface configuration hierarchies and conditional mappings. For instance, in combination with guessnet (see p. 335ff), you can run certain location checks only if others were successful; you may only want to check for the presence of a certain router if a specific wireless access point is available.

Feedback

Ladislav Bodnar, Distrowatch:
No matter how skilled you are in administrating a Debian box and irrespective of how confident you are running the multitude of Debian commands at 4 o'clock in the morning, you are bound to learn something new. There is so much amazing information packed in this book that it is impossible for any one person to know it all. A great reference material [...].