Commit 4b2960a6 authored by nanahira's avatar nanahira

fix too long

parent 45d128df
......@@ -7,8 +7,8 @@ export BRIDGE_NAME={{br.name}}
# macvlans
{% for link in br.links %}
# macvlan {{br.name}}-{{link | regex_replace('\.', '-')}} of {{link}}
ip link del dev {{br.name}}-{{link | regex_replace('\.', '-')}}
# macvlan {{br.name}}{{link | regex_replace('\.', '-')}} of {{link}}
ip link del dev {{br.name}}{{link | regex_replace('\.', '-')}}
{% endfor %}
{% endif %}
......
......@@ -14,9 +14,9 @@ export BRIDGE_NAME={{br.name}}
_wait_for_interface_online "{{link}}"
{% if br.macvlan is defined and br.macvlan %}
## macvlan {{br.name}}-{{link | regex_replace('\.', '-')}} of {{link}}
ip link add link {{link}} dev {{br.name}}-{{link | regex_replace('\.', '-')}} type macvlan
ip link set {{br.name}}-{{link | regex_replace('\.', '-')}} up
## macvlan {{br.name}}{{link | regex_replace('\.', '-')}} of {{link}}
ip link add link {{link}} dev {{br.name}}{{link | regex_replace('\.', '-')}} type macvlan
ip link set {{br.name}}{{link | regex_replace('\.', '-')}} up
{% endif %}
{% endfor %}
......
......@@ -69,7 +69,7 @@ auto {{br.name}}
allow-hotplug {{br.name}}
iface {{br.name}} inet {{br.type}}
{% if br.links is defined and br.links and br.links | length > 0 %}
bridge_ports{% for link in br.links %} {% if br.macvlan is defined and br.macvlan %}{{br.name}}-{{link | regex_replace('\.', '-')}}{% else %}{{link}}{% endif %}{% endfor %}
bridge_ports{% for link in br.links %} {% if br.macvlan is defined and br.macvlan %}{{br.name}}{{link | regex_replace('\.', '-')}}{% else %}{{link}}{% endif %}{% endfor %}
{% else %}
bridge_ports none
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment