systemd: RemainAfterExit=yes for all Type=oneshot units
Many of these are intended to run as a one-time thingy. Some of them,
such as the YANG installation bits, have been failing since the recent
switch to storing sysrepo config as a JSON file (and the related change
of not preserving /etc/sysrepo/ directly).
One especially nasty scenario is a random failure in cla-sysrepo which
leads to an automatic restart, which triggers czechlight-install-yang,
which fails horribly. Yay.
Change-Id: I76664c5fb2b8eb62a12fd19a31fc606fa7c3723c
diff --git a/package/czechlight-rauc/rauc-mark-good.service b/package/czechlight-rauc/rauc-mark-good.service
index a51f490..037295c 100644
--- a/package/czechlight-rauc/rauc-mark-good.service
+++ b/package/czechlight-rauc/rauc-mark-good.service
@@ -6,5 +6,6 @@
[Service]
Type=oneshot
+RemainAfterExit=yes
ExecStartPre=/bin/sh -c '[ "$(/bin/systemctl list-units --failed --all --no-legend --no-pager)" == "" ]'
ExecStart=/usr/bin/rauc status mark-good