dbus-broker: avoid errors when reloading when /tmp got remounted

When reloading the dbus-broker service (e.g. when switching to a new generation),
the reload fails when /tmp got remounted after the service had been started.
Since the dbus-broker service starts early, and does not have default dependencies,
this situation does occur in practice.
This change makes sure that if there are mount units for /tmp, dbus-broker gets
ordered after them.

See also https://github.com/systemd/systemd/issues/28515
This commit is contained in:
r-vdp 2023-12-13 19:34:23 +01:00 committed by Peter Hoeg
parent 2f1a96018c
commit c4b3e4f5f8

View file

@ -184,6 +184,11 @@ in
aliases = [
"dbus.service"
];
unitConfig = {
# We get errors when reloading the dbus-broker service
# if /tmp got remounted after this service started
RequiresMountsFor = [ "/tmp" ];
};
# Don't restart dbus. Bad things tend to happen if we do.
reloadIfChanged = true;
restartTriggers = [