我在 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
Run Code Online (Sandbox Code Playgroud)
问题是rsyslog当我重新启动守护进程时,我无法让守护进程处理这 8 行。
同时重新启动守护进程会删除/dev/xconsole文件,我们又回到了所有服务停止的状态。为了解决这个问题,我在脚本中的启动和重启条件之后插入了if--fi行rsyslog。问题是我没有得到echoto stdio。有人知道如何在创建设备时进行rsyslog报告吗?stdio/dev/xconsole