summaryrefslogtreecommitdiff
path: root/data/templates/ipoe-server/chap-secrets.tmpl
diff options
context:
space:
mode:
authorDmitriyEshenko <dmitriy.eshenko@vyos.io>2020-04-16 12:23:04 +0000
committerDmitriyEshenko <dmitriy.eshenko@vyos.io>2020-04-16 12:23:04 +0000
commit3b9d0bbe42ffa5504e26a7c8c850541beaa7aa9b (patch)
treea41c51705008af816a25e04dd7c8f74700c15e8b /data/templates/ipoe-server/chap-secrets.tmpl
parent9bcfdc20ade97b2d746bbe1b8506524aae710ca2 (diff)
downloadvyos-1x-3b9d0bbe42ffa5504e26a7c8c850541beaa7aa9b.tar.gz
vyos-1x-3b9d0bbe42ffa5504e26a7c8c850541beaa7aa9b.zip
ipoe: T2294: Fix templates
Diffstat (limited to 'data/templates/ipoe-server/chap-secrets.tmpl')
-rw-r--r--data/templates/ipoe-server/chap-secrets.tmpl32
1 files changed, 16 insertions, 16 deletions
diff --git a/data/templates/ipoe-server/chap-secrets.tmpl b/data/templates/ipoe-server/chap-secrets.tmpl
index 707718e94..5e35d5775 100644
--- a/data/templates/ipoe-server/chap-secrets.tmpl
+++ b/data/templates/ipoe-server/chap-secrets.tmpl
@@ -1,18 +1,18 @@
# username server password acceptable local IP addresses shaper
-{% for aifc in auth['auth_if'] %}
-{% for mac in auth['auth_if'][aifc] %}
-{% if (auth['auth_if'][aifc][mac]['up']) and (auth['auth_if'][aifc][mac]['down']) %}
+{% for aifc in auth['auth_if'] -%}
+{% for mac in auth['auth_if'][aifc] -%}
+{% if (auth['auth_if'][aifc][mac]['up']) and (auth['auth_if'][aifc][mac]['down']) -%}
+{% if auth['auth_if'][aifc][mac]['vlan'] -%}
+{{aifc}}.{{auth['auth_if'][aifc][mac]['vlan']}} * {{mac.lower()}} * {{auth['auth_if'][aifc][mac]['down']}}/{{auth['auth_if'][aifc][mac]['up']}}
+{% else -%}
+{{aifc}} * {{mac.lower()}} * {{auth['auth_if'][aifc][mac]['down']}}/{{auth['auth_if'][aifc][mac]['up']}}
+{% endif -%}
+{% else -%}
{% if auth['auth_if'][aifc][mac]['vlan'] %}
-{{aifc}}.{{auth['auth_if'][aifc][mac]['vlan']}}\t*\t{{mac.lower()}}\t*\t{{auth['auth_if'][aifc][mac]['down']}}/{{auth['auth_if'][aifc][mac]['up']}}
-{% else %}
-{{aifc}}\t*\t{{mac.lower()}}\t*\t{{auth['auth_if'][aifc][mac]['down']}}/{{auth['auth_if'][aifc][mac]['up']}}
-{% endif %}
-{% else %}
-{% if auth['auth_if'][aifc][mac]['vlan'] %}
-{{aifc}}.{{auth['auth_if'][aifc][mac]['vlan']}}\t*\t{{mac.lower()}}\t*
-{% else %}
-{{aifc}}\t*\t{{mac.lower()}}\t*
-{% endif %}
-{% endif %}
-{% endfor %}
-{% endfor %}
+{{aifc}}.{{auth['auth_if'][aifc][mac]['vlan']}} * {{mac.lower()}} *
+{% else -%}
+{{aifc}} * {{mac.lower()}} *
+{% endif -%}
+{% endif -%}
+{% endfor -%}
+{% endfor -%}