aboutsummaryrefslogtreecommitdiff
path: root/src/runscript.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-10-26 12:22:26 +0000
committerRoy Marples <roy@marples.name>2007-10-26 12:22:26 +0000
commitc02cc42b1d88b2b1fb861202ec005756fc6c71b7 (patch)
tree6f26e18e812ec61348c285b19afa987e0a3982f3 /src/runscript.c
parenta825e6f30fa7ec5cac0e34dceb6fdec116120092 (diff)
Fix the restarting of services depending on the script you're restarting
Diffstat (limited to 'src/runscript.c')
-rw-r--r--src/runscript.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/runscript.c b/src/runscript.c
index 30288218..cb5b522a 100644
--- a/src/runscript.c
+++ b/src/runscript.c
@@ -232,10 +232,10 @@ static void start_services (char **list) {
if (! list)
return;
- if ((state & RC_SERVICE_INACTIVE ||
- state & RC_SERVICE_WASINACTIVE) &&
- ((state & RC_SERVICE_STARTING) ||
- (state & RC_SERVICE_STARTED)))
+ if (state & RC_SERVICE_INACTIVE ||
+ state & RC_SERVICE_WASINACTIVE ||
+ state & RC_SERVICE_STARTING ||
+ state & RC_SERVICE_STARTED)
{
STRLIST_FOREACH (list, svc, i) {
if (rc_service_state (svc) & RC_SERVICE_STOPPED) {
@@ -542,18 +542,11 @@ static void unlink_mtime_test ()
static void get_started_services ()
{
- char *svc;
- int i;
-
rc_strlist_free (tmplist);
tmplist = rc_services_in_state (RC_SERVICE_INACTIVE);
-
rc_strlist_free (restart_services);
restart_services = rc_services_in_state (RC_SERVICE_STARTED);
-
- STRLIST_FOREACH (tmplist, svc, i)
- rc_strlist_addsort (&restart_services, svc);
-
+ rc_strlist_join (&restart_services, tmplist);
rc_strlist_free (tmplist);
tmplist = NULL;
}