update-rc.d: using dependency based boot sequencing
解决方法:
在debian6中,加入开机启动脚本的方法与debian5不同了,直接做符号链接到runlevel已经不起作用了,提示缺少LSB信息,并且用insserv来替代update-rc.d:
In Debian releases prior to 6.0, a service could be added with update-rc.d:
update-rc.d mydaemon defaults
Starting with Debian 6.0, the insserv command is used instead, if dependency-based booting is enabled:
insserv mydaemon
如果没有insserv,安装方法见:
aptitude install insserv
另参考文章 http://blog.youkuaiyun.com/xuyaqun/article/details/6968658
How to LSBize an Init Script
Add a block like this in the init.d script:
### BEGIN INIT INFO # Provides: scriptname # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start daemon at boot time # Description: Enable service provided by daemon. ### END INIT INFO
The block shown above has a special rigid format delimited by the lines
### BEGIN INIT INFO ### END INIT INFO
where all trailing spaces shall be ignored. On the other hand, all lines inside the block shall be of the form
# {keyword}: arg1 [arg2...]
and begin with a hash character '#' in the first column followed by one single space, except for the lines following the Description keyword.
本文介绍了在Debian6中如何正确配置服务的开机启动,包括使用insserv替代update-rc.d的方法,以及如何为启动脚本添加LSB信息的具体步骤。

被折叠的 条评论
为什么被折叠?



