Browse Source

pppoe: With new interface naming, the 3rd port on an APU is enp3s0.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 6 years ago
parent
commit
0f7cb26a81
1 changed files with 5 additions and 1 deletions
  1. 5 1
      pppoe/tkom_peer.tmpl

+ 5 - 1
pppoe/tkom_peer.tmpl

@@ -18,7 +18,11 @@ user "{{ user }}"
 # This line should work fine if this computer is the only one accessing
 # the Internet through this DSL connection. This is the right line to use
 # for most people.
-{%- set iface = salt['pillar.get']('nodes:' ~ grains['id'] ~ ':pppoe:iface', 'eth2') %}
+{%- set default_iface = 'eth2' %}
+{%- if salt['grains.get']('oscodename') == 'stretch' %}
+  {%- set default_iface = 'enp3s0' %}
+{%- endif %}
+{%- set iface = salt['pillar.get']('nodes:' ~ grains['id'] ~ ':pppoe:iface', default_iface) %}
 pty "/usr/sbin/pppoe -I {{ iface }} -T 80 -m 1452"
 
 # An even more conservative version of the previous line, if things