diff --git a/doc/conditions.md b/doc/conditions.md
index 531177e2..aafe30d3 100644
--- a/doc/conditions.md
+++ b/doc/conditions.md
@@ -169,7 +169,7 @@ Debugging
If a service is not being started as it should, the problem might be
that one of its conditions is not in the expected state. Use the
command `initctl status` to inspect service status. Services in the
-`ready` state are pending a condition.
+`waiting` state are pending a condition.
In that situation, running `initctl cond show` reveals which of the
conditions that are not satisfied. Listed as `off` below.
diff --git a/doc/svc-machine.png b/doc/svc-machine.png
index 15955703..02c84e7c 100644
Binary files a/doc/svc-machine.png and b/doc/svc-machine.png differ
diff --git a/doc/svc-machine.svg b/doc/svc-machine.svg
index 94f77e3f..2bcb5492 100644
--- a/doc/svc-machine.svg
+++ b/doc/svc-machine.svg
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/plugins/pidfile.c b/plugins/pidfile.c
index eb52120d..3aa90ac8 100644
--- a/plugins/pidfile.c
+++ b/plugins/pidfile.c
@@ -234,9 +234,9 @@ static void pidfile_reconf(void *arg)
}
/*
- * This will call service_step(), which in turn will schedule itself
- * as long as stepped services change state. Services going from
- * WAITING to RUNNING will reassert their conditions in that loop,
+ * This calls service_step(), which in turn schedules itself as
+ * long as stepped services change state. Services going from
+ * PAUSED to RUNNING reassert their conditions in that loop,
* which in turn may unlock other services, and so on.
*/
service_step_all(SVC_TYPE_SERVICE | SVC_TYPE_RUNTASK);
@@ -283,9 +283,9 @@ static void pidfile_init(void *arg)
*
* service /sbin/dropbear ...
*
- * Which provides the condition, will not be set by
- * pidfile.so during `initctl reload` because dropbear is still
- * SIGSTP:ed waiting for .
+ * This service provides the condition, which will not be
+ * set by pidfile.so during `initctl reload` because dropbear is still
+ * SIGSTP:ed (in state PAUSED) waiting for .
*/
static plugin_t plugin = {
.name = __FILE__,
diff --git a/src/service.c b/src/service.c
index 99c0687d..8eebaf48 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1993,14 +1993,14 @@ restart:
switch (svc->state) {
case SVC_HALTED_STATE:
if (enabled)
- svc_set_state(svc, SVC_READY_STATE);
+ svc_set_state(svc, SVC_WAITING_STATE);
break;
case SVC_DONE_STATE:
if (svc_is_changed(svc))
svc_set_state(svc, SVC_HALTED_STATE);
if (svc_is_runtask(svc) && svc_is_manual(svc) && enabled)
- svc_set_state(svc, SVC_READY_STATE);
+ svc_set_state(svc, SVC_WAITING_STATE);
break;
case SVC_STOPPING_STATE:
@@ -2046,7 +2046,7 @@ restart:
svc_set_state(svc, SVC_STARTING_STATE);
break;
- case SVC_READY_STATE:
+ case SVC_WAITING_STATE:
if (!enabled) {
svc_set_state(svc, SVC_HALTED_STATE);
} else if (cond_get_agg(svc->cond) == COND_ON) {
@@ -2125,7 +2125,7 @@ restart:
case COND_FLUX:
kill(svc->pid, SIGSTOP);
- svc_set_state(svc, SVC_WAITING_STATE);
+ svc_set_state(svc, SVC_PAUSED_STATE);
break;
case COND_ON:
@@ -2148,7 +2148,7 @@ restart:
}
break;
- case SVC_WAITING_STATE:
+ case SVC_PAUSED_STATE:
if (!enabled) {
kill(svc->pid, SIGCONT);
service_stop(svc);
@@ -2157,7 +2157,7 @@ restart:
if (!svc->pid) {
(*restart_cnt)++;
- svc_set_state(svc, SVC_READY_STATE);
+ svc_set_state(svc, SVC_WAITING_STATE);
break;
}
diff --git a/src/svc.h b/src/svc.h
index 3b000c70..dc810490 100644
--- a/src/svc.h
+++ b/src/svc.h
@@ -61,8 +61,8 @@ typedef enum {
SVC_STOPPING_STATE, /* Waiting to collect the child process */
SVC_CLEANUP_STATE, /* Running post: script */
SVC_SETUP_STATE, /* Running pre: script */
- SVC_WAITING_STATE, /* Condition is in flux, process SIGSTOPed */
- SVC_READY_STATE, /* Enabled but condition not satisfied */
+ SVC_PAUSED_STATE, /* Condition is in flux, process SIGSTOPed */
+ SVC_WAITING_STATE, /* Enabled but condition not satisfied */
SVC_STARTING_STATE, /* Conditions OK and pre: script done, start */
SVC_RUNNING_STATE, /* Process running */
} svc_state_t;
@@ -353,8 +353,8 @@ static inline char *svc_status(svc_t *svc)
return "stopping";
}
- case SVC_WAITING_STATE:
- return "waiting";
+ case SVC_PAUSED_STATE:
+ return "paused";
case SVC_CLEANUP_STATE:
return "cleanup";
@@ -362,8 +362,8 @@ static inline char *svc_status(svc_t *svc)
case SVC_SETUP_STATE:
return "setup";
- case SVC_READY_STATE:
- return "ready";
+ case SVC_WAITING_STATE:
+ return "waiting";
case SVC_RUNNING_STATE:
return "running";