summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-pppoe.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/interfaces-pppoe.py')
-rwxr-xr-xsrc/conf_mode/interfaces-pppoe.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py
index f948070ee..f318614db 100755
--- a/src/conf_mode/interfaces-pppoe.py
+++ b/src/conf_mode/interfaces-pppoe.py
@@ -325,17 +325,32 @@ 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)
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: