--- orig/interfaces.template 2014-08-11 15:25:07.380165080 +0200 +++ patched/interfaces.template 2014-08-11 15:26:06.899773745 +0200 @@ -7,8 +7,9 @@ auto lo iface lo inet loopback -{% for ifc in interfaces -%} +{% for ifc in interfaces %} auto {{ ifc.name }} +{%- if ifc.address %} iface {{ ifc.name }} inet static address {{ ifc.address }} netmask {{ ifc.netmask }} @@ -19,8 +20,9 @@ {%- if ifc.dns %} dns-nameservers {{ ifc.dns }} {%- endif %} - +{%- endif %} {% if use_ipv6 -%} +{%- if ifc.address_v6 -%} iface {{ ifc.name }} inet6 static address {{ ifc.address_v6 }} netmask {{ ifc.netmask_v6 }} @@ -28,5 +30,5 @@ gateway {{ ifc.gateway_v6 }} {%- endif %} {%- endif %} - -{%- endfor %} +{%- endif %} +{% endfor %}