From 17e9f97cbbc713bd01876296ed2c5505909b7766 Mon Sep 17 00:00:00 2001
From: Christian Poessinger <christian@poessinger.com>
Date: Wed, 8 Jul 2020 20:26:20 +0200
Subject: pppoe: T2585: fix template for on-demand dialing

Commit 65fa21f5e ("ifconfig: T2653: move pppoe interface to get_config_dict()")
directly takes the configuration keys from the CLI config and thus the keys
used for template generation have not been updated appropriately.
---
 data/templates/pppoe/ip-down.script.tmpl | 2 +-
 data/templates/pppoe/ip-up.script.tmpl   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/templates/pppoe/ip-down.script.tmpl b/data/templates/pppoe/ip-down.script.tmpl
index d9d918c97..ac14d4b07 100644
--- a/data/templates/pppoe/ip-down.script.tmpl
+++ b/data/templates/pppoe/ip-down.script.tmpl
@@ -10,7 +10,7 @@ fi
 DIALER_PID=$(cat /var/run/{{ ifname }}.pid)
 logger -t pppd[$DIALER_PID] "executing $0"
 
-{% if not on_demand %}
+{% if not connect_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=""
diff --git a/data/templates/pppoe/ip-up.script.tmpl b/data/templates/pppoe/ip-up.script.tmpl
index 6adea4bd7..8009b2e6f 100644
--- a/data/templates/pppoe/ip-up.script.tmpl
+++ b/data/templates/pppoe/ip-up.script.tmpl
@@ -6,7 +6,7 @@ if [ "$6" != "{{ ifname }}" ]; then
     exit
 fi
 
-{% if not on_demand %}
+{% if not connect_on_demand %}
 # add some info to syslog
 DIALER_PID=$(cat /var/run/{{ ifname }}.pid)
 logger -t pppd[$DIALER_PID] "executing $0"
-- 
cgit v1.2.3