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:
Joachim Wiberg committed 2022-03-25 06:50:40 +01:00
1 parent c63279630b
commit 093b3ba467
1 file changed
+1 -1
+1 -1
View File
@@ -1784,6 +1784,7 @@ restart:
switch (svc->type) {
case SVC_TYPE_SERVICE:
case SVC_TYPE_SYSV:
case SVC_TYPE_TTY:
if (svc_has_post(svc)) {
svc_set_state(svc, SVC_CLEANUP_STATE);
@@ -1794,7 +1795,6 @@ restart:
case SVC_TYPE_TASK:
case SVC_TYPE_RUN:
case SVC_TYPE_SYSV:
svc_set_state(svc, SVC_DONE_STATE);
break;