我想通过谷歌在启动rc.common没有在Mac OS上运行X
运行一个shell脚本,我发现我能在rc.common添加壳
,所以我说下面的代码在rc.common
的到底是一个权限问题?
## rc.common test ##
touch ~/test.txt
重启,有我在没有用户的test.txt倍
,当我在终端manualy测试它,它的确定
ls -l /etc/rc.common
-rw-r--r-- 1 guirong wheel 1737 3 30 22:36 /etc/rc.common
问题出在哪里?我的系统是verison 10.7.3 是它默认不是在OS X中运行?
编辑rc.common可以实现这一目标? – 2012-03-30 15:23:08
的PB是rc.common没有与用户的身份运行,所以这是正常的,你不会看到的test.txt在你的home目录。 rc.common在启动时运行,但在OS X上推荐的方法是使用的launchd用于启动东西 – matei 2012-03-30 15:28:58
THX,但似乎的launchd太复杂,我 我会考虑它 – 2012-03-30 15:41:18