Browse Source

do not fail when network_interfaces is not defined

netifs
parent
commit
0bf4a8c5d1
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      templates/network-interfaces.j2

+ 2
- 0
templates/network-interfaces.j2 View File

@@ -5,6 +5,7 @@
auto lo auto lo
iface lo inet loopback iface lo inet loopback


{% if network_interfaces is defined %}
{% for netname,netif in network_interfaces.iteritems() %} {% for netname,netif in network_interfaces.iteritems() %}
### {{ netname }} ### ### {{ netname }} ###
auto {{ netif.device }} auto {{ netif.device }}
@@ -50,6 +51,7 @@ iface {{ netif.device }} inet6 {{ ipv6.method }}
{% endfor %} {% endfor %}


{% endfor %} {% endfor %}
{% endif %}


# Include files from /etc/network/interfaces.d: # Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d source-directory /etc/network/interfaces.d

Loading…
Cancel
Save