with open(f'/run/systemd/system/{unit}.d/00-override.conf', mode='w', encoding='utf-8') as f:
f.write('\n'.join(contents))
-def create_service_dropin(service, command, reload_command=None, additional_settings=None):
+def create_service_dropin(service, command, additional_settings=None):
drop_in = [
'[Service]',
'ExecStart=',
f'ExecStart=!!{valgrind_cmd}{command}',
]
- if reload_command:
- drop_in += [
- 'ExecReload=',
- f'ExecReload={valgrind_cmd}{reload_command}',
- ]
if enable_debug:
drop_in += ['Environment=SYSTEMD_LOG_LEVEL=debug']
if asan_options:
save_timezone()
create_service_dropin('systemd-networkd', networkd_bin,
- f'{networkctl_bin} reload',
['[Service]', 'Restart=no', '[Unit]', 'StartLimitIntervalSec=0'])
create_service_dropin('systemd-resolved', resolved_bin)
create_service_dropin('systemd-timesyncd', timesyncd_bin)
'[Service]',
'ExecStart=',
f'ExecStart=!!{udevd_bin}',
- 'ExecReload=',
- f'ExecReload={udevadm_bin} control --reload --timeout 0',
]
)
create_unit_dropin(