fwupd/contrib/snap/activate-shutdown/fwupd-activate.service
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

13 lines
211 B
Desktop File

[Unit]
Description=Activate fwupd updates
After=snapd.service
[Service]
Type=oneshot
RemainAfterExit=true
ExecStop=/snap/bin/fwupd.fwupdtool activate
SuccessExitStatus=0 2
[Install]
WantedBy=multi-user.target