绕过 /etc/services 查找 xinetd

lol*_*toy 3 linux xinetd

我希望通过任意端口执行 xinetd 启动的脚本。但是,经过一些测试后,我似乎需要在 /etc/services 上为 xinetd 显式定义服务和端口以启用该服务。

xinetd 中是否有一个选项,我可以在其中禁用对 /etc/services 的查找或指定一个备用文件来查找服务/端口?

fak*_*ker 5

这应该有效:

service whatever
{
        type            = UNLISTED
        port            = 4444
        (...)
}
Run Code Online (Sandbox Code Playgroud)

该类型UNLISTED将禁用 /etc/services 或 /etc/rpc 中的查找。