开机启动服务

sh/bash/dash/ksh/zsh等Shell脚本
回复
chrwhy
帖子: 233
注册时间: 2007-11-17 19:51

开机启动服务

#1

帖子 chrwhy » 2012-02-07 20:21

写了一个shell放在 /etc/init.d/ 目录下
然后运行 sudo update-rc.d xxx.sh defaults后出现如下的错误提示

insserv: warning: script 'K20phddns.sh' missing LSB tags and overrides
insserv: warning: script 'S90sshboot' missing LSB tags and overrides
insserv: warning: script 'S22ssh-boot' missing LSB tags and overrides
insserv: warning: script 'phddns.sh' missing LSB tags and overrides
insserv: warning: script 'ssh-boot' missing LSB tags and overrides
insserv: Starting ssh-boot depends on single and therefore on system facility `$all' which can not be true!
..................

insserv: Starting ssh-boot depends on single and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service sshboot and bootlogd if started
insserv: loop involving service bootlogd at depth 3
insserv: loop involving service mountdevsubfs at depth 2
insserv: There is a loop at service sshboot if started
insserv: There is a loop at service single if started
insserv: Starting ssh-boot depends on single and therefore on system facility `$all' which can not be true!
insserv: Starting ssh-boot depends on single and therefore on system facility `$all' which can not be true!
insserv: loop involving service hostname at depth 5
insserv: There is a loop between service sshboot and mountkernfs if started
insserv: loop involving service mountkernfs at depth 1
insserv: Starting ssh-boot depends on single and therefore on system facility `$all' which can not be true!
insserv: Starting ssh-boot depends on single and therefore on system facility `$all' which can not be true!
insserv: Starting ssh-boot depends on single and therefore on system facility `$all' which can not be true!
insserv: Starting ssh-boot depends on single and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
等等一些错误
然后我使用
sudo update-rc.d-insserv xxx.sh defaults
居然成功了

这是为什么呢?
人之初, 性本善
不作恶, 共分享
回复