summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-29 14:45:00 +0200
committerChristian Poessinger <christian@poessinger.com>2020-03-29 14:45:00 +0200
commit262514c2c28324b8eb3ed907d9e1844915e1ea24 (patch)
tree0100e0365418a3600a1fa3eac0b46f4cc5388df8 /src
parent4e87fe00618b17e89b0e4ea039f9cc740830c2e8 (diff)
downloadvyos-1x-262514c2c28324b8eb3ed907d9e1844915e1ea24.tar.gz
vyos-1x-262514c2c28324b8eb3ed907d9e1844915e1ea24.zip
wwan: T1988: create peer directory on demand
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-wirelessmodem.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-wirelessmodem.py b/src/conf_mode/interfaces-wirelessmodem.py
index dcb7a37a0..05a844ac8 100755
--- a/src/conf_mode/interfaces-wirelessmodem.py
+++ b/src/conf_mode/interfaces-wirelessmodem.py
@@ -184,6 +184,11 @@ def generate(wwan):
os.unlink(wwan['chat_script'])
else:
+ # PPP peers directory
+ dirname = os.path.dirname(config_file_wwan)
+ if not os.path.isdir(dirname):
+ os.mkdir(dirname)
+
# Create PPP configuration files
tmpl = Template(config_wwan_tmpl)
config_text = tmpl.render(wwan)