xinetd 启动过早

xinetd 启动过早

当服务器启动时 xinetd 启动时,它会抱怨其中一个服务描述中指定的 IP 不可用。

我的 eth0 的 IP 未在 /etc/network/interfaces 中配置,而是在 NetworkManager 中配置,并且如果可能的话,我希望保持这种状态。

我怎样才能让 xinetd 等到网络接口准备就绪?

/etc/init/xinitd.conf 中有一行start on runlevel [2345]。我将其改为,start on (net-device-up and runlevel [2345])但似乎仍然没有帮助。

答案1

我发现net-device-up在 /etc/init/xinitd.conf 中使用实际上是正确的方法,但默认情况下,如果任何网络设备(包括环回设备)准备就绪,则会触发该事件。

完整的解决方案是指定需要启动的特定网络设备net-device-up IFACE=eth0,或者必须启动除 localhost 之外的任何网络设备(net-device-up IFACE!=lo)

相关内容