2020-09-27 14:46:26 +00:00
|
|
|
default_target = node.metadata['raspberrypi']['default-target']
|
|
|
|
|
|
|
|
# On a FAT filesystem.
|
|
|
|
file_perms = {
|
|
|
|
'owner': None,
|
|
|
|
'group': None,
|
|
|
|
'mode': None,
|
|
|
|
}
|
|
|
|
|
|
|
|
actions = {
|
|
|
|
'raspberrypi_assure_target': {
|
|
|
|
'command': f'systemctl set-default {default_target}',
|
2020-09-27 15:18:05 +00:00
|
|
|
'unless': f'[ "$(systemctl get-default)" = "{default_target}" ]',
|
2020-09-27 14:46:26 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
files = {
|
2024-07-30 15:44:09 +00:00
|
|
|
'/boot/firmware/cmdline.txt': {
|
2020-09-27 14:46:26 +00:00
|
|
|
'content': ' '.join(sorted(node.metadata['raspberrypi']['cmdline'])),
|
|
|
|
**file_perms,
|
|
|
|
},
|
2024-07-30 15:44:09 +00:00
|
|
|
'/boot/firmware/config.txt': {
|
2020-09-27 14:46:26 +00:00
|
|
|
'content_type': 'mako',
|
|
|
|
'context': node.metadata['raspberrypi'],
|
|
|
|
**file_perms,
|
|
|
|
},
|
|
|
|
}
|