summaryrefslogtreecommitdiffabout
path: root/src/ctl.c
authorSergey Poznyakoff <gray@gnu.org>2016-01-31 14:40:27 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2016-01-31 14:40:27 (GMT)
commitd9d267052215f223897af18310e4adee310308e7 (patch) (unidiff)
tree6b6f9eb636975f5721e00d2d71007185fa5b2fbf /src/ctl.c
parent6f9f2fd7a6952b544dccbf0bdc7f9c312f602afe (diff)
downloadpies-d9d267052215f223897af18310e4adee310308e7.tar.gz
pies-d9d267052215f223897af18310e4adee310308e7.tar.bz2
Support sysvinit ondemand components.
* src/ctl.c (fun_start): Handle status_finished same as status_sleeping (for restarting ondemand components). * src/progman.c: Respawn ondemand components. * src/sysvinit.c (enablecomp): Handle pies_comp_ondemand. (sysvinit_demand): New function. (sysvinit_fifo_handler): Handle ondemand runlevels. (inittab_parse): Support "off" fields. Convert runlevels to upper case.
Diffstat (limited to 'src/ctl.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/ctl.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ctl.c b/src/ctl.c
index 0e5ea97..489fc7f 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -1878,4 +1878,5 @@ fun_start (struct json_value *result, struct prog *prog)
1878{ 1878{
1879 if (prog->v.p.status == status_disabled) 1879 switch (prog->v.p.status)
1880 { 1880 {
1881 case status_disabled:
1881 prog->v.p.comp->flags &= ~CF_DISABLED; 1882 prog->v.p.comp->flags &= ~CF_DISABLED;
@@ -1883,5 +1884,6 @@ fun_start (struct json_value *result, struct prog *prog)
1883 json_object_set_string (result, "status", "OK"); 1884 json_object_set_string (result, "status", "OK");
1884 } 1885 break;
1885 else if (prog->v.p.status == status_sleeping) 1886
1886 { 1887 case status_sleeping:
1888 case status_finished:
1887 prog->v.p.status = status_enabled; 1889 prog->v.p.status = status_enabled;
@@ -1890,5 +1892,5 @@ fun_start (struct json_value *result, struct prog *prog)
1890 json_object_set_string (result, "status", "OK"); 1892 json_object_set_string (result, "status", "OK");
1891 } 1893 break;
1892 else 1894
1893 { 1895 default:
1894 json_object_set_string (result, "status", "ER"); 1896 json_object_set_string (result, "status", "ER");

Return to:

Send suggestions and report system problems to the System administrator.