Ensure that runscript returns 0 when service is started

This commit is contained in:
Roy Marples 2007-10-09 15:44:22 +00:00
parent dc0ba7ebf3
commit 537ef36350

View File

@ -1223,7 +1223,8 @@ int runscript (int argc, char **argv)
} else if (strcmp (optarg, "status") == 0) {
rc_service_state_t r = svc_status (service);
retval = (int) r;
if (retval == RC_SERVICE_STARTED)
retval = 0;
} else if (strcmp (optarg, "help") == 0) {
execl (RCSCRIPT_HELP, RCSCRIPT_HELP, service, "help", (char *) NULL);
eerrorx ("%s: failed to exec `" RCSCRIPT_HELP "': %s",