Do not reboot when failing to start fwupd during offline updates

If another offline update task is run at the same time, e.g. pk-offline-update
from PackageKit then we might corrupt the package database when the client
D-Bus request times out.

Copy the fixes from PackageKit so that the offline updates work together.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1685471
This commit is contained in:
Richard Hughes 2019-03-08 09:58:55 +00:00 committed by Mario Limonciello
parent d1f25ee9b6
commit ad73719fa4

View File

@ -1,11 +1,13 @@
[Unit]
Description=Updates device firmware whilst offline
Documentation=man:fwupdmgr
OnFailure=reboot.target
ConditionPathExists=/var/lib/fwupd/pending.db
DefaultDependencies=false
Requires=sysinit.target
After=sysinit.target system-update-pre.target
Requires=sysinit.target dbus.socket
After=sysinit.target system-update-pre.target dbus.socket systemd-journald.socket
Before=shutdown.target system-update.target
[Service]
Type=oneshot
ExecStart=@bindir@/fwupdmgr install-prepared
FailureAction=reboot