summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-05-21 19:06:03 +0200
committerChristian Poessinger <christian@poessinger.com>2020-05-21 19:06:03 +0200
commit49defb01143eb032b143ecee8ee0e7d007d6b0f2 (patch)
tree48e85be31ee648db1f0e4d5b0b266c73eba04660 /src/conf_mode
parent39c53aadbf9ee63efd802de52755341b11ea77d1 (diff)
downloadvyos-1x-49defb01143eb032b143ecee8ee0e7d007d6b0f2.tar.gz
vyos-1x-49defb01143eb032b143ecee8ee0e7d007d6b0f2.zip
pppoe: T2380: dis-/connect should use proper systemd calls
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/interfaces-pppoe.py47
1 files changed, 23 insertions, 24 deletions
diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py
index 95136ecfa..f58095f13 100755
--- a/src/conf_mode/interfaces-pppoe.py
+++ b/src/conf_mode/interfaces-pppoe.py
@@ -205,30 +205,29 @@ def generate(pppoe):
if os.path.exists(file):
os.unlink(file)
- else:
- # generated script must be executable
-
- # Create PPP configuration files
- render(config_pppoe, 'pppoe/peer.tmpl',
- pppoe, trim_blocks=True, permission=0o755)
- # Create script for ip-pre-up.d
- render(script_pppoe_pre_up, 'pppoe/ip-pre-up.script.tmpl',
- pppoe, trim_blocks=True, permission=0o755)
- # Create script for ip-up.d
- render(script_pppoe_ip_up, 'pppoe/ip-up.script.tmpl',
- pppoe, trim_blocks=True, permission=0o755)
- # Create script for ip-down.d
- render(script_pppoe_ip_down, 'pppoe/ip-down.script.tmpl',
- pppoe, trim_blocks=True, permission=0o755)
- # Create script for ipv6-up.d
- render(script_pppoe_ipv6_up, 'pppoe/ipv6-up.script.tmpl',
- pppoe, trim_blocks=True, permission=0o755)
-
- if len(pppoe['dhcpv6_pd']) > 0:
- # ipv6.tmpl relies on ifname - this should be made consitent in the
- # future better then double key-ing the same value
- pppoe['ifname'] = intf
- render(config_wide_dhcp6c, 'dhcp-client/ipv6.tmpl', pppoe, trim_blocks=True)
+ return None
+
+ # Create PPP configuration files
+ render(config_pppoe, 'pppoe/peer.tmpl',
+ pppoe, trim_blocks=True, permission=0o755)
+ # Create script for ip-pre-up.d
+ render(script_pppoe_pre_up, 'pppoe/ip-pre-up.script.tmpl',
+ pppoe, trim_blocks=True, permission=0o755)
+ # Create script for ip-up.d
+ render(script_pppoe_ip_up, 'pppoe/ip-up.script.tmpl',
+ pppoe, trim_blocks=True, permission=0o755)
+ # Create script for ip-down.d
+ render(script_pppoe_ip_down, 'pppoe/ip-down.script.tmpl',
+ pppoe, trim_blocks=True, permission=0o755)
+ # Create script for ipv6-up.d
+ render(script_pppoe_ipv6_up, 'pppoe/ipv6-up.script.tmpl',
+ pppoe, trim_blocks=True, permission=0o755)
+
+ if len(pppoe['dhcpv6_pd']) > 0:
+ # ipv6.tmpl relies on ifname - this should be made consitent in the
+ # future better then double key-ing the same value
+ pppoe['ifname'] = intf
+ render(config_wide_dhcp6c, 'dhcp-client/ipv6.tmpl', pppoe, trim_blocks=True)
return None