summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitriyEshenko <dmitriy.eshenko@vyos.io>2021-01-27 14:19:22 +0000
committerChristian Poessinger <christian@poessinger.com>2021-01-27 18:43:52 +0100
commitfb5a64a0a517291efe62185d053b437b62ef2921 (patch)
tree0c1b95ba2d81b977736e1b85c9bfc76ea7179f9d /src
parent6f44059fb3b77238226bb9319cc6beb235c42a05 (diff)
downloadvyos-1x-fb5a64a0a517291efe62185d053b437b62ef2921.tar.gz
vyos-1x-fb5a64a0a517291efe62185d053b437b62ef2921.zip
pppoe: T3261: Stop systemd service if pppoe interface disable
(cherry picked from commit 7630f2c915c27bceabcc808fcd9d29ed198b9dbe)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-pppoe.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py
index c31e49574..fd8919918 100755
--- a/src/conf_mode/interfaces-pppoe.py
+++ b/src/conf_mode/interfaces-pppoe.py
@@ -79,7 +79,7 @@ def generate(pppoe):
config_files = [config_pppoe, script_pppoe_pre_up, script_pppoe_ip_up,
script_pppoe_ip_down, script_pppoe_ipv6_up, config_wide_dhcp6c]
- if 'deleted' in pppoe:
+ if 'deleted' in pppoe or 'disable' in pppoe:
# stop DHCPv6-PD client
call(f'systemctl stop dhcp6c@{ifname}.service')
# Hang-up PPPoE connection
@@ -116,13 +116,11 @@ def generate(pppoe):
return None
def apply(pppoe):
- if 'deleted' in pppoe:
- # bail out early
+ if 'deleted' in pppoe or 'disable' in pppoe:
+ call('systemctl stop ppp@{ifname}.service'.format(**pppoe))
return None
- if 'disable' not in pppoe:
- # Dial PPPoE connection
- call('systemctl restart ppp@{ifname}.service'.format(**pppoe))
+ call('systemctl restart ppp@{ifname}.service'.format(**pppoe))
return None