From 426f37f098eb694dcb13421b380e536a2046aecd Mon Sep 17 00:00:00 2001 From: cronekorkn Date: Thu, 4 May 2023 17:46:39 +0200 Subject: [PATCH] bundles/systemd-swap/metadata.py: swapfile-prepare.service and swapfile.swap are part of each other (one restarts the other) --- bundles/systemd-swap/metadata.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bundles/systemd-swap/metadata.py b/bundles/systemd-swap/metadata.py index d4f6d8c..6b7dcce 100644 --- a/bundles/systemd-swap/metadata.py +++ b/bundles/systemd-swap/metadata.py @@ -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',