coredump: Don't log an error if D-Bus isn't running

coredumpctl could be used in a chroot where D-Bus isn't running. If
that's the case, we shouldn't consider it an error if we can't connect
to the D-Bus daemon so let's reduce the severity of the error we log
when we can't connect to D-Bus because the socket doesn't exist.
This commit is contained in:
Daan De Meyer 2021-10-06 13:20:36 +01:00 committed by Yu Watanabe
parent d489317f59
commit 414bd2e786

View file

@ -1180,6 +1180,10 @@ static int check_units_active(void) {
return false;
r = sd_bus_default_system(&bus);
if (r == -ENOENT) {
log_debug("D-Bus is not running, skipping active unit check");
return 0;
}
if (r < 0)
return log_error_errno(r, "Failed to acquire bus: %m");