1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-06 17:18:12 +03:00

systemctl: skip triggering unit warning if unit vanished

This commit is contained in:
Mike Yuan 2024-02-29 23:45:54 +08:00
parent 399646faac
commit 701bd9d08a
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3

View File

@ -383,8 +383,8 @@ void warn_triggering_units(sd_bus *bus, const char *unit, const char *operation,
r = get_active_triggering_units(bus, unit, ignore_masked, &triggered_by);
if (r < 0) {
log_warning_errno(r,
"Failed to get triggering units for '%s', ignoring: %m", unit);
if (r != -ENOENT) /* A linked unit might have disappeared after disabling */
log_warning_errno(r, "Failed to get triggering units for '%s', ignoring: %m", unit);
return;
}