summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-pppoe.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-29 14:44:26 +0200
committerChristian Poessinger <christian@poessinger.com>2020-03-29 14:44:26 +0200
commit4e87fe00618b17e89b0e4ea039f9cc740830c2e8 (patch)
treeb790050a92bf01be43b63ba627d8f4cdcb417271 /src/conf_mode/interfaces-pppoe.py
parentd16758e0a3f794dce99415191d6b0c9cd09cf806 (diff)
downloadvyos-1x-4e87fe00618b17e89b0e4ea039f9cc740830c2e8.tar.gz
vyos-1x-4e87fe00618b17e89b0e4ea039f9cc740830c2e8.zip
pppoe: T1318: create peer directory on demand
Diffstat (limited to 'src/conf_mode/interfaces-pppoe.py')
-rwxr-xr-xsrc/conf_mode/interfaces-pppoe.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py
index 0c46dbecd..f318614db 100755
--- a/src/conf_mode/interfaces-pppoe.py
+++ b/src/conf_mode/interfaces-pppoe.py
@@ -325,6 +325,11 @@ def generate(pppoe):
os.unlink(ip_pre_up_script_file)
else:
+ # PPP peers directory
+ dirname = os.path.dirname(config_file_pppoe)
+ if not os.path.isdir(dirname):
+ os.mkdir(dirname)
+
# Create PPP configuration files
tmpl = Template(config_pppoe_tmpl)
config_text = tmpl.render(pppoe)