[systemd-devel] Question about system-update.target

Richard Hughes hughsient at gmail.com
Mon Apr 27 08:51:57 PDT 2015


On 27 April 2015 at 16:42, Lennart Poettering <lennart at poettering.net> wrote:
> - ship a service packagekit-reboot.service that contains:
>
>   [Service]
>   ExecStart=/bin/systemctl reboot --no-block
>   Type=oneshot

If that file was shipped in systemd, fwupd could use the same method
without having to ship the extra duplicated files. e.g.
system-update-post-reboot.service

> Then, order both your update services
> "Before=packagegit-reboot.service packagekit-poweroff.service", so
> that they run before those services are started.

Makes sense so far.

> Finally, from packagekit, enqueue pretty early on, before you start
> installation either one or the other of the two services, depending on
> packagkit's configuration. This is easily done by issuing the
> StartUnit() bus call on the systemd service file passing either
> "packagekit-reboot.service" or "packagekit-poweroff.service" as first
> parameter, and "replace" as second.

Clever stuff.

> I hope that makes sense?

and remove OnFailure=reboot.target, right?

Richard.


More information about the systemd-devel mailing list