Skip to content

Commit

Permalink
systemctl: skip triggering unit warning if unit vanished
Browse files Browse the repository at this point in the history
(cherry picked from commit 701bd9d08ac1d16f74e2b453ca0826e85b1c8491)
(cherry picked from commit 67e0d093682d763ff1d27027a5040571fc039193)
  • Loading branch information
YHNdnzj authored and bluca committed Jul 24, 2024
1 parent 9b5cb42 commit 159d823
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/systemctl/systemctl-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,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;
}

Expand Down

0 comments on commit 159d823

Please sign in to comment.