diff options
author | Luca Boccassi <bluca@debian.org> | 2023-07-23 00:27:15 +0200 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2023-07-23 00:27:27 +0200 |
commit | 3835b9aa4ba0094b06e9bf9b39786fe33d99ea1d (patch) | |
tree | be66ffdebbf3346a70daceddb8a7664c48e550b7 /src/core/slice.c | |
parent | po: Translated using Weblate (Czech) (diff) | |
download | systemd-3835b9aa4ba0094b06e9bf9b39786fe33d99ea1d.tar.xz systemd-3835b9aa4ba0094b06e9bf9b39786fe33d99ea1d.zip |
Revert "core: add IgnoreOnSoftReboot= unit option"
The feature is not ready, postpone it
This reverts commit b80fc61e8971283606f9cd0a48e31d0f701c82f1.
Diffstat (limited to 'src/core/slice.c')
-rw-r--r-- | src/core/slice.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/slice.c b/src/core/slice.c index 069bfe1ea8..490aabfd35 100644 --- a/src/core/slice.c +++ b/src/core/slice.c @@ -64,22 +64,22 @@ static int slice_add_parent_slice(Slice *s) { } static int slice_add_default_dependencies(Slice *s) { + int r; + assert(s); if (!UNIT(s)->default_dependencies) return 0; /* Make sure slices are unloaded on shutdown */ - if (!UNIT(s)->ignore_on_soft_reboot) - return unit_add_two_dependencies_by_name( - UNIT(s), - UNIT_BEFORE, UNIT_CONFLICTS, - SPECIAL_SHUTDOWN_TARGET, true, - UNIT_DEPENDENCY_DEFAULT); - - /* Unless we are meant to survive soft reboot, in which case we need to conflict with - * non-soft-reboot targets. */ - return unit_add_dependencies_on_real_shutdown_targets(UNIT(s)); + r = unit_add_two_dependencies_by_name( + UNIT(s), + UNIT_BEFORE, UNIT_CONFLICTS, + SPECIAL_SHUTDOWN_TARGET, true, UNIT_DEPENDENCY_DEFAULT); + if (r < 0) + return r; + + return 0; } static int slice_verify(Slice *s) { |