Reload, don't restart, dbus.service
Many bus clients get hopelessly confused when dbus-daemon is restarted. So let's not do that. Of course, this is not ideal either, because we end up stuck with a possibly outdated dbus-daemon. But that issue will become irrelevant in the glorious kdbus-based future. Hopefully this also gets rid of systemd getting stuck after dbus-daemon is restarted: Apr 01 15:37:50 mandark systemd[1]: Failed to register match for Disconnected message: Connection timed out Apr 01 15:37:50 mandark systemd[1]: Looping too fast. Throttling execution a little. Apr 01 15:37:51 mandark systemd[1]: Looping too fast. Throttling execution a little. ...
This commit is contained in:
parent
b3e1021b41
commit
1c39a47ac8
@ -130,6 +130,9 @@ in
|
||||
config.system.path
|
||||
];
|
||||
|
||||
# Don't restart dbus-daemon. Bad things tend to happen if we do.
|
||||
systemd.services.dbus.reloadIfChanged = true;
|
||||
|
||||
environment.pathsToLink = [ "/etc/dbus-1" "/share/dbus-1" ];
|
||||
|
||||
};
|
||||
|
@ -384,9 +384,13 @@ system("@systemd@/bin/systemctl", "reset-failed");
|
||||
# Make systemd reload its units.
|
||||
system("@systemd@/bin/systemctl", "daemon-reload") == 0 or $res = 3;
|
||||
|
||||
# Signal dbus to reload its configuration before starting other units.
|
||||
# Other units may rely on newly installed policy files under /etc/dbus-1
|
||||
system("@systemd@/bin/systemctl", "reload-or-restart", "dbus.service");
|
||||
# Reload units that need it. This includes remounting changed mount
|
||||
# units.
|
||||
if (scalar(keys %unitsToReload) > 0) {
|
||||
print STDERR "reloading the following units: ", join(", ", sort(keys %unitsToReload)), "\n";
|
||||
system("@systemd@/bin/systemctl", "reload", "--", sort(keys %unitsToReload)) == 0 or $res = 4;
|
||||
unlink($reloadListFile);
|
||||
}
|
||||
|
||||
# Restart changed services (those that have to be restarted rather
|
||||
# than stopped and started).
|
||||
@ -407,14 +411,6 @@ print STDERR "starting the following units: ", join(", ", @unitsToStartFiltered)
|
||||
system("@systemd@/bin/systemctl", "start", "--", sort(keys %unitsToStart)) == 0 or $res = 4;
|
||||
unlink($startListFile);
|
||||
|
||||
# Reload units that need it. This includes remounting changed mount
|
||||
# units.
|
||||
if (scalar(keys %unitsToReload) > 0) {
|
||||
print STDERR "reloading the following units: ", join(", ", sort(keys %unitsToReload)), "\n";
|
||||
system("@systemd@/bin/systemctl", "reload", "--", sort(keys %unitsToReload)) == 0 or $res = 4;
|
||||
unlink($reloadListFile);
|
||||
}
|
||||
|
||||
|
||||
# Print failed and new units.
|
||||
my (@failed, @new, @restarting);
|
||||
|
Loading…
x
Reference in New Issue
Block a user