From ce0e0bed719844ef6f813c4d176e350bd424636c Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Tue, 24 Aug 2021 18:52:47 +0200 Subject: projectroot: rauc-mark-good: adapt unit properties from systemd-bless-boot.service Mark the system "good" when the boot-complete.target [1] is reached. "Type=oneshot" (instead of implicit "Type=simple") makes sure the unit is considered started once "rauc status mark-good" exits. "RemainAfterExit=yes" ensures that this service unit is only started once [2]. These options were adapted from [3] and [4]. [1] https://www.freedesktop.org/software/systemd/man/systemd.special.html#boot-complete.target [2] https://www.freedesktop.org/software/systemd/man/systemd.service.html#id-1.10.4 [3] https://github.com/systemd/systemd/blob/main/units/systemd-bless-boot.service.in [4] https://github.com/rauc/meta-rauc/pull/197 Signed-off-by: Bastian Krause Message-Id: <20210824165247.31292-1-bst@pengutronix.de> Signed-off-by: Michael Olbrich --- projectroot/usr/lib/systemd/system/rauc-mark-good.service | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'projectroot') diff --git a/projectroot/usr/lib/systemd/system/rauc-mark-good.service b/projectroot/usr/lib/systemd/system/rauc-mark-good.service index af4daab9f..06f9fa8fd 100644 --- a/projectroot/usr/lib/systemd/system/rauc-mark-good.service +++ b/projectroot/usr/lib/systemd/system/rauc-mark-good.service @@ -2,8 +2,12 @@ Description=RAUC Good-marking Service ConditionKernelCommandLine=|bootchooser.active ConditionKernelCommandLine=|rauc.slot +After=boot-complete.target +Requires=boot-complete.target [Service] +Type=oneshot +RemainAfterExit=yes ExecStart=/usr/bin/rauc status mark-good [Install] -- cgit v1.2.3