]> git.proxmox.com Git - mirror_ifupdown2.git/blame - docs/README.rst
This release adds support for the new IPSec Interface XFRM.
[mirror_ifupdown2.git] / docs / README.rst
CommitLineData
a6f80f0e 1python-ifupdown2
2================
3
4This package is a replacement for the debian ifupdown package.
2c0ad8b3 5It is ifupdown re-written in python. It maintains the original ifupdown
a6f80f0e 6pluggable architecture and extends it further.
7
8The python-ifupdown2 package provides the infrastructure for
9parsing /etc/network/interfaces file, loading, scheduling and state
10management of interfaces.
11
12It dynamically loads python modules from /usr/share/ifupdownmodules (provided
13 by the python-ifupdown2-addons package). To remain compatible with other
14packages that depend on ifupdown, it also executes scripts under /etc/network/.
15To make the transition smoother, a python module under
16/usr/share/ifupdownmodules will override a script by the same name under
17/etc/network/.
18
19It publishes an interface object which is passed to all loadble python
2c0ad8b3
RP
20modules. For more details on adding a addon module, see the section on
21adding python modules.
a6f80f0e 22
23
24pluggable python modules:
25=========================
26Unlike original ifupdown, all interface configuration is moved to external
27python modules. That includes inet, inet6 and dhcp configurations.
28
2c0ad8b3
RP
29A set of default modules are provided by the python-ifupdown2-addons deb.
30
31python-ifupdown2 expects a few things from the pluggable modules:
a6f80f0e 32- the module should implement a class by the same name
33- the interface object (class iface) and the operation to be performed is
34 passed to the modules
2c0ad8b3 35- the python addon class should provide a few methods:
a6f80f0e 36 - run() : method to configure the interface.
37 - get_ops() : must return a list of operations it supports.
38 eg: 'pre-up', 'post-down'
39 - get_dependent_ifacenames() : must return a list of interfaces the
40 interface is dependent on. This is used to build the dependency list
2c0ad8b3
RP
41 for sorting and executing interfaces in dependency order.
42 - if the module supports -r option to ifquery, ie ability to construct the
43 ifaceobj from running state, it can optionally implement the
44 get_dependent_ifacenames_running() method, to return the list of
45 dependent interfaces derived from running state of the interface.
46 This is different from get_dependent_ifacenames() where the dependent
47 interfaces are derived from the interfaces config file (provided by the
48 user).
4716e0e5 49
2c0ad8b3 50Example: Address handling module /usr/share/ifupdownaddons/address.py
4716e0e5 51
4716e0e5 52
2c0ad8b3
RP
53build
54=====
55- get source
4716e0e5 56
2c0ad8b3
RP
57- install build dependencies:
58 apt-get install python-stdeb
59 apt-get install python-docutils
4716e0e5 60
2c0ad8b3 61- cd <python-ifupdown2 sourcedir> && ./build.sh
4716e0e5 62
2c0ad8b3 63 (generates python-ifupdown2-<ver>.deb)
739f665b 64
2c0ad8b3
RP
65install
66=======
739f665b 67
2c0ad8b3
RP
68- remove existing ifupdown package
69 dpkg -r ifupdown
70
71- install python-ifupdown2 using `dpkg -i`
72
73- or install from deb
74 dpkg -i python-ifupdown2-<ver>.deb
739f665b 75
2c0ad8b3
RP
76- note that python-ifupdown2 requires python-ifupdown2-addons package to
77 function. And python-ifupdown2-addons deb has an install dependency on
78 python-ifupdown2