Silence launch of inetd services.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-02-09 00:57:21 +01:00
parent 51b27e8372
commit d6efe85a57
2 changed files with 9 additions and 6 deletions
+1
View File
@@ -36,6 +36,7 @@
}
#define FLOG_DEBUG(fmt, args...) DO_LOG(LOG_DEBUG, fmt, ##args)
#define FLOG_INFO(fmt, args...) DO_LOG(LOG_INFO, fmt, ##args)
#define FLOG_WARN(fmt, args...) DO_LOG(LOG_WARNING, fmt, ##args)
#define FLOG_ERROR(fmt, args...) DO_LOG(LOG_CRIT, fmt, ##args)
#define FLOG_PERROR(fmt, args...) DO_LOG(LOG_CRIT, fmt ". Error %d: %s", ##args, errno, strerror(errno))
+8 -6
View File
@@ -521,9 +521,10 @@ int svc_start(svc_t *svc)
_d("New client socket %d accepted for inetd service %d/tcp", sd, svc->port);
}
}
if (SVC_CMD_SERVICE != svc->type)
FLOG_INFO("Starting inetd service %s ...", svc->service);
}
else if (SVC_CMD_SERVICE != svc->type)
print_desc("", svc->desc);
else if (!respawn)
print_desc("Starting ", svc->desc);
@@ -594,10 +595,11 @@ int svc_start(svc_t *svc)
}
svc->pid = pid;
if (SVC_CMD_INETD == svc->type && svc->sock_type == SOCK_STREAM)
close(sd);
if (SVC_CMD_RUN == svc->type)
if (SVC_CMD_INETD == svc->type) {
if (svc->sock_type == SOCK_STREAM)
close(sd);
}
else if (SVC_CMD_RUN == svc->type)
print_result(WEXITSTATUS(complete(svc->cmd, pid)));
else if (!respawn)
print_result(svc->pid > 1 ? 0 : 1);