mirror of
https://github.com/troglobit/finit.git
synced 2026-11-03 13:28:27 +00:00
Fix problem with restarting stopped SysV init scripts
SysV init scripts should not go to "done" state but "halted" so we can do: `initctl stop foo; initctl start foo`, like we do for our regular monitored services. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
c63279630b
commit
093b3ba467
1 file changed
+1
-1
+1
-1
@@ -1784,6 +1784,7 @@ restart:
|
|||||||
|
|
||||||
switch (svc->type) {
|
switch (svc->type) {
|
||||||
case SVC_TYPE_SERVICE:
|
case SVC_TYPE_SERVICE:
|
||||||
|
case SVC_TYPE_SYSV:
|
||||||
case SVC_TYPE_TTY:
|
case SVC_TYPE_TTY:
|
||||||
if (svc_has_post(svc)) {
|
if (svc_has_post(svc)) {
|
||||||
svc_set_state(svc, SVC_CLEANUP_STATE);
|
svc_set_state(svc, SVC_CLEANUP_STATE);
|
||||||
@@ -1794,7 +1795,6 @@ restart:
|
|||||||
|
|
||||||
case SVC_TYPE_TASK:
|
case SVC_TYPE_TASK:
|
||||||
case SVC_TYPE_RUN:
|
case SVC_TYPE_RUN:
|
||||||
case SVC_TYPE_SYSV:
|
|
||||||
svc_set_state(svc, SVC_DONE_STATE);
|
svc_set_state(svc, SVC_DONE_STATE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user