diff options
author | Luca Boccassi <bluca@debian.org> | 2022-03-08 22:13:37 +0000 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2022-03-10 13:16:21 +0000 |
commit | ee3ae55e7537c716530b293c91f3fb9ae22a8049 (patch) | |
tree | f94534ceb5f937f2e3b140ff110a891fba1e4349 /src | |
parent | bd844eae233b74ebf151ceefa0a5f026978bebab (diff) | |
download | systemd-ee3ae55e7537c716530b293c91f3fb9ae22a8049.tar.gz |
core: do not return 'skipped' when Condition*= fail with StartUnitWithFlags()
Backward incompatible change to avoid returning 'skipped' if a condition causes
a job activation to be skipped when using StartUnitWithFlags().
Job results are broadcasted, so it is theoretically possible that existing
software could get confused if they see this result.
Replaces https://github.com/systemd/systemd/pull/22369
Diffstat (limited to 'src')
-rw-r--r-- | src/core/dbus-unit.c | 4 | ||||
-rw-r--r-- | src/core/dbus-unit.h | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index 1e01241676..6542d50330 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -417,10 +417,6 @@ int bus_unit_method_start_generic( return sd_bus_reply_method_errorf(message, SD_BUS_ERROR_INVALID_ARGS, "Invalid 'flags' parameter '%" PRIu64 "'", input_flags); - - /* The new method unconditionally uses the new behaviour of returning 'skip' when - * a job is skipped. */ - job_flags |= BUS_UNIT_QUEUE_RETURN_SKIP_ON_CONDITION_FAIL; } r = bus_verify_manage_units_async_full( diff --git a/src/core/dbus-unit.h b/src/core/dbus-unit.h index ccb379cee5..ab7787ce46 100644 --- a/src/core/dbus-unit.h +++ b/src/core/dbus-unit.h @@ -31,7 +31,7 @@ int bus_unit_method_thaw(sd_bus_message *message, void *userdata, sd_bus_error * typedef enum BusUnitQueueFlags { BUS_UNIT_QUEUE_RELOAD_IF_POSSIBLE = 1 << 0, BUS_UNIT_QUEUE_VERBOSE_REPLY = 1 << 1, - BUS_UNIT_QUEUE_RETURN_SKIP_ON_CONDITION_FAIL = 1 << 2, + BUS_UNIT_QUEUE_RETURN_SKIP_ON_CONDITION_FAIL = 1 << 2, // FIXME: currently not used, will be changed soon } BusUnitQueueFlags; int bus_unit_queue_job_one( |