From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 24 Aug 2021 18:53:12 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mIZfk-0004dM-Uq for lore@lore.pengutronix.de; Tue, 24 Aug 2021 18:53:12 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mIZfk-0000sr-KH; Tue, 24 Aug 2021 18:53:12 +0200 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7] helo=dude.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mIZfM-0000sg-8F; Tue, 24 Aug 2021 18:52:48 +0200 From: Bastian Krause To: ptxdist@pengutronix.de Date: Tue, 24 Aug 2021 18:52:47 +0200 Message-Id: <20210824165247.31292-1-bst@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [ptxdist] [PATCH] projectroot: rauc-mark-good: adapt unit properties from systemd-bless-boot.service X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Bastian Krause Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 --- 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