Commit Graph

3 Commits

Author SHA1 Message Date
Elvis Stansvik
efc2e47e48 Start fwupd-activate.service after snapd.service
Instead of using RequiresMountsFor=/snap/fwupd/current, which will not
work since /snap/fwupd/current is a symlink [1].

This will work since the mount units generated by snapd all have
Before=snapd.service, so will be stopped after snapd.service during
shutdown.

With After=snapd.service, fwupd-activate.service will then stop before
snapd.service, at a point when all snap mount units are still running.

Fixes the issue where fwupd-activate.service hangs when stopped, causing
a stop job timeout during shutdown.

[1] See https://github.com/systemd/systemd/issues/8907

Closes #1654
2020-03-15 09:06:21 -05:00
Mario Limonciello
a3069f57b0 trivial: snap: set return code 2 on fwupd-activate.service as success
Otherwise the common case (nothing to do) will return 2 and show the systemd
unit as failed every time.
2019-04-04 22:30:25 +01:00
Mario Limonciello
a29ca19793 snap: Add a custom systemd unit to call activation on shutdown (Fixes: #1125)
The systemd shutdown script gets called after /snap/fwupd/* gets
unmounted meaning it can't be used to do the activation.

Explicitly check that the symlink for /snap/fwupd/current is mounted
when calling the script.
2019-04-02 07:10:56 -05:00