core: don't allow manual start with reload-or-restart too
fix bug: systemctl reload-or-restart starts a service with RefuseManualStart=yes
This commit is contained in:
parent
e05ac0557f
commit
efb30ba1a6
|
@ -986,7 +986,8 @@ int bus_unit_queue_job(
|
|||
|
||||
if ((type == JOB_START && u->refuse_manual_start) ||
|
||||
(type == JOB_STOP && u->refuse_manual_stop) ||
|
||||
((type == JOB_RESTART || type == JOB_TRY_RESTART) && (u->refuse_manual_start || u->refuse_manual_stop)))
|
||||
((type == JOB_RESTART || type == JOB_TRY_RESTART) && (u->refuse_manual_start || u->refuse_manual_stop)) ||
|
||||
(type == JOB_RELOAD_OR_START && job_type_collapse(type, u) == JOB_START && u->refuse_manual_start))
|
||||
return sd_bus_error_setf(error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, unit %s may be requested by dependency only.", u->id);
|
||||
|
||||
r = manager_add_job(u->manager, type, u, mode, true, error, &j);
|
||||
|
|
Loading…
Reference in a new issue