From: Lennart Poettering Date: Fri, 9 Oct 2015 15:18:18 +0000 (+0200) Subject: core: ignore -.slice and init.scope when isolating X-Git-Tag: v228~223^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=417800228f69db9ff37f4193d11508757dd09308;p=thirdparty%2Fsystemd.git core: ignore -.slice and init.scope when isolating Otherwise, we might end up trying to isolate it away when starting user instances. While we are at it, also prohibit manual start/stop of these two units. Fixes: #1507 --- diff --git a/src/core/scope.c b/src/core/scope.c index 7325e3601b0..ea7d846578b 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -534,6 +534,9 @@ static int scope_enumerate(Manager *m) { u->transient = true; u->default_dependencies = false; u->no_gc = true; + u->ignore_on_isolate = true; + u->refuse_manual_start = true; + u->refuse_manual_stop = true; SCOPE(u)->deserialized_state = SCOPE_RUNNING; SCOPE(u)->kill_context.kill_signal = SIGRTMIN+14; diff --git a/src/core/slice.c b/src/core/slice.c index 063024134ac..1542e83eb6b 100644 --- a/src/core/slice.c +++ b/src/core/slice.c @@ -274,6 +274,9 @@ static int slice_enumerate(Manager *m) { u->default_dependencies = false; u->no_gc = true; + u->ignore_on_isolate = true; + u->refuse_manual_start = true; + u->refuse_manual_stop = true; SLICE(u)->deserialized_state = SLICE_ACTIVE; if (!u->description)