bundles/systemd-swap/metadata.py: swapfile-prepare.service and swapfile.swap are part of each other (one restarts the other)

This commit is contained in:
cronekorkn 2023-05-04 17:46:39 +02:00
parent 22d92af61b
commit 426f37f098
Signed by: cronekorkn
SSH key fingerprint: SHA256:v0410ZKfuO1QHdgKBsdQNF64xmTxOF8osF1LIqwTcVw

View file

@ -3,6 +3,11 @@ defaults = {
'systemd': {
'units': {
'swapfile.swap': {
'Unit': {
'PartOf': {
'swapfile-prepare.service', # restart together
},
},
'Swap': {
'What': '/swapfile',
},
@ -31,6 +36,9 @@ def unit(metadata):
'Before': {
'swapfile.swap',
},
'PartOf': {
'swapfile.swap', # restart together
},
},
'Service': {
'Type': 'oneshot',