summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-openvpn.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-27 15:41:17 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-27 15:41:17 +0100
commita2ac9fac16eeb626d3969092fecf463650750640 (patch)
treeab54dfe9c575e1bf719735e859ac136e375cf5c8 /src/conf_mode/interfaces-openvpn.py
parentfb7e761ae3efa8f17d9199f29dae2fdc1f51f188 (diff)
downloadvyos-1x-a2ac9fac16eeb626d3969092fecf463650750640.tar.gz
vyos-1x-a2ac9fac16eeb626d3969092fecf463650750640.zip
vyos.template: T2720: always enable Jinja2 trim_blocks feature
Diffstat (limited to 'src/conf_mode/interfaces-openvpn.py')
-rwxr-xr-xsrc/conf_mode/interfaces-openvpn.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/conf_mode/interfaces-openvpn.py b/src/conf_mode/interfaces-openvpn.py
index 0e661c84b..25920f893 100755
--- a/src/conf_mode/interfaces-openvpn.py
+++ b/src/conf_mode/interfaces-openvpn.py
@@ -467,7 +467,7 @@ def generate(openvpn):
# Generate User/Password authentication file
if 'authentication' in openvpn:
render(openvpn['auth_user_pass_file'], 'openvpn/auth.pw.tmpl', openvpn,
- trim_blocks=True, user=user, group=group, permission=0o600)
+ user=user, group=group, permission=0o600)
else:
# delete old auth file if present
if os.path.isfile(openvpn['auth_user_pass_file']):
@@ -482,13 +482,12 @@ def generate(openvpn):
client_config['server_subnet'] = dict_search('server.subnet', openvpn)
render(client_file, 'openvpn/client.conf.tmpl', client_config,
- trim_blocks=True, user=user, group=group)
+ user=user, group=group)
# we need to support quoting of raw parameters from OpenVPN CLI
# see https://phabricator.vyos.net/T1632
render(cfg_file.format(**openvpn), 'openvpn/server.conf.tmpl', openvpn,
- trim_blocks=True, formater=lambda _: _.replace("&quot;", '"'),
- user=user, group=group)
+ formater=lambda _: _.replace("&quot;", '"'), user=user, group=group)
# Fixup file permissions
for file in fix_permissions: