Name interfaces using mactab

master
LEdoian 2 years ago
parent afa4ed311b
commit ca51082938

@ -23,6 +23,7 @@ for dir in output/*/; do
interfaces /etc/network/interfaces
hosts /etc/hosts
hostname /etc/hostname
mactab /etc/mactab
END
umount "$mount"
losetup -d "$loop"

@ -29,6 +29,7 @@ class Computer:
'bird.conf',
'hosts',
'hostname',
'mactab',
]
context = {'c': self}

@ -1,19 +1,9 @@
auto lo
iface lo inet loopback
{# auto {% for x in range(len(c.bridges)) %} eth{{x}} {% endfor %} #}
auto /eth*
mapping eth*
script TODO/get-mac-address.sh
{% for br in c.bridges %}
map 52:54:00:17:{{ '%02x:%02x' % (c.num, br.num) }} net_{{br.num}}
{% endfor %}
{% for br in c.bridges %}
auto net_{{ br.num }}
iface net_{{br.num}} inet static
address 172.23.{{ br.num }}.{{ c.num }}/24
{% endfor %}

@ -0,0 +1,5 @@
{% for br in c.bridges %}
net_{{ br.num }} 52:54:00:17:{{ '%02x:%02x' % (c.num, br.num) }}
{% endfor %}
Loading…
Cancel
Save