diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-03-29 11:07:10 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-03-29 11:07:17 +0200 |
commit | 272d6a0968fb22bda0c82068ed1cbf7d9ddd3fd9 (patch) | |
tree | 2063e0740676128b10a018b6eb0897c54e831980 /src/conf_mode/interfaces-pppoe.py | |
parent | 24e9308482486ff967f443917ad97253dbd315e8 (diff) | |
download | vyos-1x-272d6a0968fb22bda0c82068ed1cbf7d9ddd3fd9.tar.gz vyos-1x-272d6a0968fb22bda0c82068ed1cbf7d9ddd3fd9.zip |
pppoe: T1988: bugfix creating ip-pre-up.d directory after moving to vyos-1x
The creation of this directory has been done in the past using vyatta-
wirelessmodem and after it's replacement in vyos-1x the directory has not been
deployed anymore. Thos when rendering the PPPoE configuration the directory will
be created on deemand.
Diffstat (limited to 'src/conf_mode/interfaces-pppoe.py')
-rwxr-xr-x | src/conf_mode/interfaces-pppoe.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py index f948070ee..0c46dbecd 100755 --- a/src/conf_mode/interfaces-pppoe.py +++ b/src/conf_mode/interfaces-pppoe.py @@ -331,11 +331,21 @@ def generate(pppoe): with open(config_file_pppoe, 'w') as f: f.write(config_text) + # PPP ip-pre-up.d scripting directory + dirname = os.path.dirname(ip_pre_up_script_file) + if not os.path.isdir(dirname): + os.mkdir(dirname) + tmpl = Template(config_pppoe_ip_pre_up_tmpl) config_text = tmpl.render(pppoe) with open(ip_pre_up_script_file, 'w') as f: f.write(config_text) + # PPP ipv6-up.d scripting directory + dirname = os.path.dirname(ipv6_if_up_script_file) + if not os.path.isdir(dirname): + os.mkdir(dirname) + tmpl = Template(config_pppoe_ipv6_up_tmpl) config_text = tmpl.render(pppoe) with open(ipv6_if_up_script_file, 'w') as f: |