From: Bastian Krause <bst@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Bastian Krause <bst@pengutronix.de>
Subject: [ptxdist] [PATCH] projectroot: rauc-mark-good: adapt unit properties from systemd-bless-boot.service
Date: Tue, 24 Aug 2021 18:52:47 +0200 [thread overview]
Message-ID: <20210824165247.31292-1-bst@pengutronix.de> (raw)
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 <bst@pengutronix.de>
---
projectroot/usr/lib/systemd/system/rauc-mark-good.service | 4 ++++
1 file changed, 4 insertions(+)
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]
--
2.30.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
next reply other threads:[~2021-08-24 16:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-24 16:52 Bastian Krause [this message]
2021-10-07 10:18 ` [ptxdist] [APPLIED] " Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210824165247.31292-1-bst@pengutronix.de \
--to=bst@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox