]> git.proxmox.com Git - mirror_ifupdown2.git/blob - README
execute 'up' on upper devices if ifup is called with --with-depends
[mirror_ifupdown2.git] / README
1 python-ifupdown2
2 ================
3
4 This package is a replacement for the debian ifupdown package.
5 It is completely re-written in python. It maintains the original ifupdown
6 pluggable architecture and extends it further.
7
8 The python-ifupdown2 package provides the infrastructure for
9 parsing /etc/network/interfaces file, loading, scheduling and state
10 management of interfaces.
11
12 It dynamically loads python modules from /usr/share/ifupdownmodules (provided
13 by the python-ifupdown2-addons package). To remain compatible with other
14 packages that depend on ifupdown, it also executes scripts under /etc/network/.
15 To 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
19 It publishes an interface object which is passed to all loadble python
20 modules (more details about the interface object is available in the
21 python docs).
22
23
24 pluggable python modules:
25 =========================
26 Unlike original ifupdown, all interface configuration is moved to external
27 python modules. That includes inet, inet6 and dhcp configurations.
28
29 It expects a few things from the pluggable modules:
30 - the module should implement a class by the same name
31 - the interface object (class iface) and the operation to be performed is
32 passed to the modules
33 - the python class should provide a few methods:
34 - run() : method to configure the interface.
35 - get_ops() : must return a list of operations it supports.
36 eg: 'pre-up', 'post-down'
37 - get_dependent_ifacenames() : must return a list of interfaces the
38 interface is dependent on. This is used to build the dependency list
39 for sorting and executing interfaces in parallel.
40
41 install instructions
42 ====================
43 - remove existing ifupdown package
44 dpkg -r ifupdown
45
46 - download python-ifupdown2*.deb's and install
47
48 - or apt-get from testing repo
49 apt-get install python-ifupdown2
50 apt-get install python-ifupdown2-addons
51
52 - or install from deb
53 dpkg -i python-ifupdown2-<ver>.deb
54 dpkg -i python-ifupdown2-addons-<ver>.deb
55
56
57 extra packages to use addional packages:
58 ======================================
59
60 To use templates install python-mako (from wheezy):
61 apt-get install python-mako
62
63 To generate dot files install python-gvgen (from wheezy):
64 apt-get install python-gvgen
65