summaryrefslogtreecommitdiff
path: root/data/templates/pppoe/ip-up.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-up.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-up.script.tmpl')
-rw-r--r--data/templates/pppoe/ip-up.script.tmpl12
1 files changed, 6 insertions, 6 deletions
diff --git a/data/templates/pppoe/ip-up.script.tmpl b/data/templates/pppoe/ip-up.script.tmpl
index a274296b6..6adea4bd7 100644
--- a/data/templates/pppoe/ip-up.script.tmpl
+++ b/data/templates/pppoe/ip-up.script.tmpl
@@ -2,13 +2,13 @@
# 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
{% if not on_demand %}
# 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 default_route != 'none' -%}
@@ -17,9 +17,9 @@ logger -t pppd[$DIALER_PID] "executing $0"
SED_OPT="^ip 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_"}
# generate new SED command
@@ -43,7 +43,7 @@ done
{% endif %}
# Add default route to default or VRF routing table
-vtysh -c "conf t" ${VTY_OPT} -c "ip route 0.0.0.0/0 {{ intf }} ${VRF_NAME}"
-logger -t pppd[$DIALER_PID] "added default route via {{ intf }} ${VRF_NAME}"
+vtysh -c "conf t" ${VTY_OPT} -c "ip route 0.0.0.0/0 {{ ifname }} ${VRF_NAME}"
+logger -t pppd[$DIALER_PID] "added default route via {{ ifname }} ${VRF_NAME}"
{% endif %}
{% endif %}