Merge pull request #36209 from vieira/once_per_interface

Fixes routes being installed with wrong interfaces
This commit is contained in:
Mike Place 2016-09-13 09:57:42 +09:00 committed by GitHub
commit c997d224b8

View File

@ -1,5 +1,6 @@
#!/bin/sh
# {{route_type}}
test "${IFACE}" = "{{iface}}" || exit 0
{% for route in routes %}{% if route.name %}# {{route.name}}
{%endif%}route {{route_type}} -net {% if route.ipaddr %}{{route.ipaddr}}{%endif%} {% if route.netmask %}netmask {{route.netmask}}{%endif%} {% if route.gateway %}gateway {{route.gateway}}{%endif%} dev {{iface}}
{% endfor %}