Fix #101: remove built-in inetd from finit

This patch removes the built-in inetd support from Finit.  We recommend
using an external inetd instead, e.g. xinetd.

If you liked the feature set our inetd provided; filtering per interface
and port redirection, then please let us know or use the code in this
patch (MIT licensed) to recreate it.  We are open to reintroducing it,
but then as a stand-alone daemon like the bundled watchdogd and getty.

So long for now, old friend.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-02-11 12:46:40 +01:00
1 parent 673a9a55a2
commit e88a9b14ff
19 files changed
+60 -1835

No files matched your search

-21
View File
@@ -158,19 +158,6 @@ static svc_t *do_find(char *buf, size_t len)
return svc_find_by_nameid(input, id);
}
#ifdef INETD_ENABLED
static int do_query_inetd(char *buf, size_t len)
{
svc_t *svc;
svc = do_find(buf, len);
if (!svc || !svc_is_inetd(svc))
return 1;
return inetd_filter_str(&svc->inetd, buf, len);
}
#endif /* INETD_ENABLED */
typedef struct {
char *event;
void (*cb)(void);
@@ -291,14 +278,6 @@ static void api_cb(uev_t *w, void *arg, int events)
result = do_restart(rq.data, sizeof(rq.data));
break;
#ifdef INETD_ENABLED
case INIT_CMD_QUERY_INETD:
_d("query inetd");
strterm(rq.data, sizeof(rq.data));
result = do_query_inetd(rq.data, sizeof(rq.data));
break;
#endif
case INIT_CMD_GET_RUNLEVEL:
_d("get runlevel");
rq.runlevel = runlevel;