core: failed scope units may not be restarted

We don't allow reusing of scopes.
This commit is contained in:
Lennart Poettering 2013-09-11 19:26:47 +02:00
parent 44ded3abc2
commit 7b617155b5
2 changed files with 5 additions and 0 deletions

2
TODO
View File

@ -58,6 +58,8 @@ CGroup Rework Completion:
Features:
* ensure scope units may be started only a single time
* document that in instead of FsckPassNo= people should just add a manual dep to systemd-fsck@.service to their mount units.
* better error message if you run systemctl without systemd running

View File

@ -239,6 +239,9 @@ static int scope_start(Unit *u) {
assert(s);
if (s->state == SCOPE_FAILED)
return -EPERM;
if (s->state == SCOPE_STOP_SIGTERM ||
s->state == SCOPE_STOP_SIGKILL)
return -EAGAIN;