Closed Bastian-Krause closed 3 years ago
Good idea to utilize
ConditionKernelCommandLine=|...
to start the unit only if the bootloader explicitely booted one or the other slot. But then the directiveWantedBy=multi-user.target
should be removed at the same time.
I think WantedBy
is still needed to activate the unit. Are you sure this works without it?
The introduction of
RemainAfterExit=yes
makes sense as well because it ensures that this service unit is only started once (see e.g. section "Example 4. Stoppable oneshot service" in the manpage for systemd.service). Starting dependencies only after success ofrauc status mark-good
is already arranged by the choice ofType=oneshot
compared toType=simple
, so the commit message should be adjusted in that respect.
Correct, I misread the man page regarding that option. Will adjust the commit message.
I think
WantedBy
is still needed to activate the unit. Are you sure this works without it?
You are right and my understanding of triggering conditions was not correct, so please forget about my suggestion to remove WantedBy=multi-user.target
.
Cherry-picked to 'dunfell' branch.
Make the rauc-mark-good.service run only if
bootchooser.active
orrauc.slot
are set in the kernel command line. During debugging/development, boot from NFS or non-bootchooser boots might be used. In these casesrauc status mark-good
will fail.RemainAfterExit=yes
allows systemd to start dependencies only afterrauc status mark-good
has succeeded.While at it, use the official RAUC spelling and remove the trailing empty line.