缺少/ dev / xconsole导致rsyslog以及所有其他服务停止

我在Hyper-V环境中运行Ubuntu-10.04.04LTS。 我发现SSH,HTTP或其他任何其他服务都已停止,因为rsyslog守护程序因消息unable to find the /dev/xconsole file

我用以下内容暂时修复了它。

 FILE=/dev/xconsole if [ -e $FILE ]; then echo "$FILE exists Carry on!" else mknod -m 640 /dev/xconsole c 1 3 chown syslog:adm /dev/xconsole echo "Created $FILE." fi 

问题是当我重新启动守护进程时,我无法让rsyslog守护进程处理这8行。

同样重新启动守护程序会删除/dev/xconsole文件,我们将返回所有已停止的服务。 在解决这个问题时,我在rsyslog脚本中的启动和重启条件之后插入了iffi行。 问题是我没有得到stdioecho 。 有人知道如何在创建/dev/xconsole设备时将/dev/xconsole报告发送到stdio吗?

这存在的原因是因为Ubuntu Server 12.04错误地假设您已安装xterminal 。 它可能是他们的桌面操作系统的遗留问题,默认情况下它可能存在。

无论如何,最好的办法就是将它从/etc/rsyslog.d/50-default.conf注释掉,如下所示:

 # daemon.*;mail.*;\ # news.err;\ # *.=debug;*.=info;\ # *.=notice;*.=warn |/dev/xconsole 

而中提琴,没有更多的错误。

BTW。 我怀疑这会导致它死亡。