summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-05 17:57:19 +0100
committerChristian Poessinger <christian@poessinger.com>2020-03-05 17:57:19 +0100
commitd161cbbe201061a0926889f598c2a43d3c65e052 (patch)
tree98056c52ab9296f8d7c3a7b93c8ec1ea3b8350c6 /src
parent6af0e8af2ab4b9151df5dbce8b4899e6f1093852 (diff)
downloadvyos-1x-d161cbbe201061a0926889f598c2a43d3c65e052.tar.gz
vyos-1x-d161cbbe201061a0926889f598c2a43d3c65e052.zip
pppoe: T1493: fix invalid reference of ipv6-up script file
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-pppoe.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py
index 0622e4c9a..8002f55fa 100755
--- a/src/conf_mode/interfaces-pppoe.py
+++ b/src/conf_mode/interfaces-pppoe.py
@@ -277,7 +277,7 @@ def verify(pppoe):
def generate(pppoe):
config_file_pppoe = '/etc/ppp/peers/{}'.format(pppoe['intf'])
- script_file = '/etc/ppp/ipv6-up.d/50-vyos-{}-autoconf'.format(pppoe['intf'])
+ ipv6_ifup_script_file = '/etc/ppp/ipv6-up.d/50-vyos-{}-autoconf'.format(pppoe['intf'])
# Always hang-up PPPoE connection prior generating new configuration file
cmd = 'systemctl stop ppp@{}.service'.format(pppoe['intf'])
@@ -288,14 +288,14 @@ def generate(pppoe):
if os.path.exists(config_file_pppoe):
os.unlink(config_file_pppoe)
- if os.path.exists(script_file):
- os.unlink(config_file_pppoe)
+ if os.path.exists(ipv6_ifup_script_file):
+ os.unlink(ipv6_ifup_script_file)
else:
# Create PPP configuration files
tmpl = Template(config_pppoe_tmpl)
config_text = tmpl.render(pppoe)
- with open(config_file_pppoe, 'w') as f:
+ with open(ipv6_ifup_script_file, 'w') as f:
f.write(config_text)
script_file = '/etc/ppp/ipv6-up.d/50-vyos-{}-autoconf'.format(pppoe['intf'])