Skip to content

Commit 3b00071

Browse files
author
Ritwick DSouza
committed
[raspbian] Fixed interfaces jinja2 template
1 parent 9b7bf7a commit 3b00071

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

netjsonconfig/backends/raspbian/templates/interfaces.jinja2

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
{% if data.interfaces %}
2+
# config: /etc/network/interfaces
3+
4+
{% endif%}
15
{% for interface in data.interfaces %}
26
{% if interface.get('iftype') in ['ethernet', 'bridge', 'loopback', 'wireless'] %}
3-
# config: /etc/network/interfaces
47
{% if interface.get('address') != None %}
5-
68
auto {{ interface.get('ifname') }}
79
{% for address in interface.get('address') %}
810
{% if address.get('proto') == 'static' %}
@@ -80,7 +82,6 @@
8082
{% endif%}
8183
{% endfor %}
8284
{% else %}
83-
8485
auto {{ interface.get('ifname') }}
8586
{% if interface.get('iftype') in ['ethernet', 'wireless'] and interface.get('mode') != 'adhoc' %}
8687
iface {{ interface.get('ifname') }} inet manual

0 commit comments

Comments
 (0)