diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-03-05 17:57:19 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-03-05 17:57:19 +0100 |
commit | d161cbbe201061a0926889f598c2a43d3c65e052 (patch) | |
tree | 98056c52ab9296f8d7c3a7b93c8ec1ea3b8350c6 | |
parent | 6af0e8af2ab4b9151df5dbce8b4899e6f1093852 (diff) | |
download | vyos-1x-d161cbbe201061a0926889f598c2a43d3c65e052.tar.gz vyos-1x-d161cbbe201061a0926889f598c2a43d3c65e052.zip |
pppoe: T1493: fix invalid reference of ipv6-up script file
-rwxr-xr-x | src/conf_mode/interfaces-pppoe.py | 8 |
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']) |