bundles/wide-dhcp-client: fix some bugs

This commit is contained in:
Franzi 2023-09-23 09:23:41 +02:00
parent a61a3816ed
commit c59a3038a1
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 13 additions and 19 deletions

View file

@ -2,18 +2,21 @@ if node.has_bundle('pppd'):
files['/etc/ppp/ip-up.d/wide-dhcp6c'] = {
'source': 'ip-up',
'content_type': 'mako',
'context': {
'source': node.metadata['wide-dhcp6c']['source'],
},
'context': node.metadata.get('wide-dhcp6c'),
'mode': '0755',
'triggers': {
'svc_systemd:wide-dhcpv6-client:restart',
},
}
files['/etc/ppp/ip-down.d/wide-dhcp6c'] = {
'source': 'ip-down',
'content_type': 'mako',
'context': {
'targets': node.metadata['wide-dhcp6c']['targets'],
},
'context': node.metadata.get('wide-dhcp6c'),
'mode': '0755',
'triggers': {
'svc_systemd:wide-dhcpv6-client:restart',
},
}
# Will be started and stopped by pppd.
@ -25,11 +28,7 @@ else:
files['/etc/wide-dhcpv6/dhcp6c.conf'] = {
'content_type': 'mako',
'context': {
'source': node.metadata['wide-dhcp6c']['source'],
'targets': node.metadata['wide-dhcp6c']['targets'],
'subnet_len': node.metadata['wide-dhcp6c']['subnet_len'],
},
'context': node.metadata.get('wide-dhcp6c'),
'triggers': {
'svc_systemd:wide-dhcpv6-client:restart',
},
@ -37,9 +36,7 @@ files['/etc/wide-dhcpv6/dhcp6c.conf'] = {
files['/etc/systemd/system/wide-dhcpv6-client.service'] = {
'content_type': 'mako',
'context': {
'source': node.metadata['wide-dhcp6c']['source'],
},
'context': node.metadata.get('wide-dhcp6c'),
'triggers': {
'action:systemd-reload',
'svc_systemd:wide-dhcpv6-client:restart',