mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Silence launch of inetd services.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user