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

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
This commit is contained in:
Lennart Poettering 2015-10-09 17:18:18 +02:00
parent c463a6f1c4
commit 417800228f
2 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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)