]>
Commit | Line | Data |
---|---|---|
2c8c4ce7 RP |
1 | python-ifupdown2 |
2 | ---------------- | |
3 | ||
4 | The python-ifupdown2 package provides the infrastructure for | |
5 | parsing /etc/network/interfaces file, loading, scheduling, template parsing, | |
6 | state management and interface dependency generation of interfaces. | |
ea230f73 RP |
7 | It dynamically loads python addon modules from /usr/share/ifupdownmodules. |
8 | To remain compatible with other packages that depend on ifupdown, it also | |
9 | executes scripts under /etc/network/. To make the transition smoother, a | |
10 | python module under /usr/share/ifupdownmodules will override a script by | |
11 | the same name under /etc/network/. ifupdown2 publishes an interface object which | |
12 | is passed to all loadble python addon modules. All lodable modules are | |
13 | called for every interface declared in the /etc/network/interfaces file. | |
2c8c4ce7 | 14 | |
ea230f73 RP |
15 | Addon modules are responsible for applying interface configuration. |
16 | python-ifupdown2 ships with a set of default addon modules. Each module can | |
17 | declare its own set of supported attributes. Each module is passed the iface | |
18 | object (which is a representation of /etc/network/interfaces | |
19 | iface entry). Each module is also passed the operation to be performed. | |
2c8c4ce7 | 20 | |
ea230f73 RP |
21 | Example modules are /usr/share/ifupdownmodules/address.py, |
22 | /usr/share/ifupdownmodules/bridge.py etc | |
23 | ||
24 | The order in which these modules are invoked is listed in | |
25 | /var/lib/ifupdownaddons/addons.conf. There is an ifaddon utility in the works | |
26 | to better manage the module ordering. | |
27 | ||
28 | For more details on adding an addon module, see the section on adding python | |
29 | modules. For details on how to write a module, see the api reference and | |
30 | development documentation. | |
2c8c4ce7 | 31 |