36 lines
823 B
Python
36 lines
823 B
Python
if node.metadata.get('radvd', {}).get('integrate-with-pppd', False):
|
|
files['/etc/ppp/ip-up.d/radvd'] = {
|
|
'source': 'ip-up',
|
|
'mode': '0755',
|
|
}
|
|
files['/etc/ppp/ip-down.d/radvd'] = {
|
|
'source': 'ip-down',
|
|
'mode': '0755',
|
|
}
|
|
|
|
# Will be started and stopped by pppd.
|
|
should_be_running = None
|
|
should_be_enabled = False
|
|
else:
|
|
should_be_running = True
|
|
should_be_enabled = True
|
|
|
|
files['/etc/radvd.conf'] = {
|
|
'content_type': 'mako',
|
|
'context': {
|
|
'interfaces': node.metadata['radvd']['interfaces'],
|
|
},
|
|
'triggers': {
|
|
'svc_systemd:radvd:restart',
|
|
},
|
|
}
|
|
|
|
svc_systemd = {
|
|
'radvd': {
|
|
'running': should_be_running,
|
|
'enabled': should_be_enabled,
|
|
'needs': {
|
|
'file:/etc/radvd.conf',
|
|
},
|
|
},
|
|
}
|