mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-07-13 12:59:28 +03:00
Merge pull request #4447 from poettering/oneshotassertfix
core: if the start command vanishes during runtime don't hit an assert
This commit is contained in:
@ -1756,7 +1756,15 @@ static void service_enter_start(Service *s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!c) {
|
if (!c) {
|
||||||
assert(s->type == SERVICE_ONESHOT);
|
if (s->type != SERVICE_ONESHOT) {
|
||||||
|
/* There's no command line configured for the main command? Hmm, that is strange. This can only
|
||||||
|
* happen if the configuration changes at runtime. In this case, let's enter a failure
|
||||||
|
* state. */
|
||||||
|
log_unit_error(UNIT(s), "There's no 'start' task anymore we could start: %m");
|
||||||
|
r = -ENXIO;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
service_enter_start_post(s);
|
service_enter_start_post(s);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user