为什么不执行rc.local?
我在群集中PXE启动一些Ubuntu机器。 我的rc.local
脚本突然停止了工作。
我检查了/etc/rc.local
的权限:
-rwxr-xr-x 1 root root 1087 Jan 14 11:04 /etc/rc.local
我已经检查过rc.local
在以下文件夹中是符号链接的:
/etc/rc2.d /etc/rc3.d /etc/rc4.d /etc/rc5.d
它们都符号链接到/etc/init.d/rc.local
。
我试图从脚本输出echo线到/tmp/test.out
但没有运气。 当我在机器启动后执行rc.local
脚本时,它工作正常。
是什么导致rc.local
不能运行?
我终于搞定了。 Dunno,如果这是最好的解决方案,但现在工作。 我将/etc/init.d/rc.local
和/etc/rc.local
到了不同的位置,然后我跑了
update-rc.d rc.local remove
之后我将两个脚本移回原位并运行
update-rc.d rc.local defaults
现在似乎工作正常。