summaryrefslogtreecommitdiff
path: root/data/templates/pppoe/ip-down.script.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-30 16:52:00 +0200
committerChristian Poessinger <christian@poessinger.com>2020-07-01 19:06:56 +0200
commit65fa21f5e79114fa861d99eae154baad35ce2f11 (patch)
tree9ba87d9e896323d6d05be3a09219b8701a922e6e /data/templates/pppoe/ip-down.script.tmpl
parentf4892241d8248d0e22f971fdc3acd897c7035be9 (diff)
downloadvyos-1x-65fa21f5e79114fa861d99eae154baad35ce2f11.tar.gz
vyos-1x-65fa21f5e79114fa861d99eae154baad35ce2f11.zip
ifconfig: T2653: move pppoe interface to get_config_dict()
Diffstat (limited to 'data/templates/pppoe/ip-down.script.tmpl')
-rw-r--r--data/templates/pppoe/ip-down.script.tmpl14
1 files changed, 7 insertions, 7 deletions
diff --git a/data/templates/pppoe/ip-down.script.tmpl b/data/templates/pppoe/ip-down.script.tmpl
index 9e6bd2a8e..f69f9fc1a 100644
--- a/data/templates/pppoe/ip-down.script.tmpl
+++ b/data/templates/pppoe/ip-down.script.tmpl
@@ -2,21 +2,21 @@
# As PPPoE is an "on demand" interface we need to re-configure it when it
# becomes up
-if [ "$6" != "{{ intf }}" ]; then
+if [ "$6" != "{{ ifname }}" ]; then
exit
fi
# add some info to syslog
-DIALER_PID=$(cat /var/run/{{ intf }}.pid)
+DIALER_PID=$(cat /var/run/{{ ifname }}.pid)
logger -t pppd[$DIALER_PID] "executing $0"
{% if not on_demand %}
# See https://phabricator.vyos.net/T2248. Determine if we are enslaved to a
# VRF, this is needed to properly insert the default route.
VRF_NAME=""
-if [ -d /sys/class/net/{{ intf }}/upper_* ]; then
+if [ -d /sys/class/net/{{ ifname }}/upper_* ]; then
# Determine upper (VRF) interface
- VRF=$(basename $(ls -d /sys/class/net/{{ intf }}/upper_*))
+ VRF=$(basename $(ls -d /sys/class/net/{{ ifname }}/upper_*))
# Remove upper_ prefix from result string
VRF=${VRF#"upper_"}
# Populate variable to run in VR context
@@ -24,13 +24,13 @@ if [ -d /sys/class/net/{{ intf }}/upper_* ]; then
fi
# Always delete default route when interface goes down
-vtysh -c "conf t" ${VRF_NAME} -c "no ip route 0.0.0.0/0 {{ intf }} ${VRF_NAME}"
+vtysh -c "conf t" ${VRF_NAME} -c "no ip route 0.0.0.0/0 {{ ifname }} ${VRF_NAME}"
{% if ipv6_enable %}
-vtysh -c "conf t" ${VRF_NAME} -c "no ipv6 route ::/0 {{ intf }} ${VRF_NAME}"
+vtysh -c "conf t" ${VRF_NAME} -c "no ipv6 route ::/0 {{ ifname }} ${VRF_NAME}"
{% endif %}
{% endif %}
{% if dhcpv6_pd_interfaces %}
# Start wide dhcpv6 client
-systemctl stop dhcp6c@{{ intf }}.service
+systemctl stop dhcp6c@{{ ifname }}.service
{% endif %}