aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-08-17 13:23:43 +0000
committerRoy Marples <roy@marples.name>2007-08-17 13:23:43 +0000
commit0963e067664119c6ae352167698e1fc8fc8f02d5 (patch)
tree601493be880a12ab171f347dc4a066a3cb0592e5 /src
parent7aaa601aad6c88176ec1c5f214153b358c54b379 (diff)
Mark the right service as failed and only output a new line if we outputted anything at all for /etc/init.d/foo needsme
Diffstat (limited to 'src')
-rw-r--r--src/runscript.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runscript.c b/src/runscript.c
index 1bab5690..6a2c4079 100644
--- a/src/runscript.c
+++ b/src/runscript.c
@@ -887,7 +887,7 @@ static void svc_stop (bool deps)
strcmp (softlevel, RC_LEVEL_REBOOT) == 0 ||
strcmp (softlevel, RC_LEVEL_SINGLE) == 0))
continue;
- rc_mark_service (svc, rc_service_failed);
+ rc_mark_service (service, rc_service_failed);
}
eerrorx ("ERROR: cannot stop %s as %s is still up",
@@ -1216,7 +1216,8 @@ int runscript (int argc, char **argv)
softlevel, depoptions);
STRLIST_FOREACH (services, svc, i)
printf ("%s%s", i == 1 ? "" : " ", svc);
- printf ("\n");
+ if (services)
+ printf ("\n");
} else if (strcmp (optarg, "status") == 0) {
rc_service_state_t r = svc_status (service);
retval = (int) r;