写了一个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
居然成功了
这是为什么呢?
开机启动服务
sh/bash/dash/ksh/zsh等Shell脚本
前往
- 公告/注意事项
- ↳ 新闻和通知
- ↳ 软件推荐
- 系统安装
- ↳ 教学和常见问答
- ↳ 系统安装和升级
- ↳ 启动和引导
- ↳ 网卡无线拨号
- ↳ 硬件与内核
- ↳ 笔记本及便携设备
- ↳ Ubuntu衍生版
- ↳ 其他类Unix OS发行版
- ↳ Debian发行版
- 配置美化
- ↳ 中文显示和输入法
- ↳ 个人配置文件存放点
- ↳ 软件文档翻译
- ↳ 窗口管理器及美化
- ↳ 桌面展示
- 软件使用
- ↳ 办公、图像、机械电子设计等
- ↳ Vim和Emacs
- ↳ 开源模板库
- ↳ 互联网相关软件
- ↳ 影音多媒体
- ↳ 游戏和模拟器
- ↳ 虚拟机和虚拟化
- ↳ Wine及其分支
- ↳ 其它类软件
- 服务器管理
- ↳ 服务器运维
- ↳ 云计算和容器(K8S/KVM/Docker/WSL等)
- ↳ Ubuntu VPS
- 程序设计与开发
- ↳ Shell脚本
- ↳ 软件/网站开发
- ↳ 内核及嵌入式开发
- ↳ Ubuntu编译和打包
- ↳ 开源小工具
- ↳ 挑战任务
- 感想与交流
- ↳ 深度PK版
- ↳ Ubuntu故事和感慨
- ↳ 同城交流
- ↳ 校园社团
- ↳ 港澳台校区
- ↳ 国外校区
- 站务区
- ↳ 论坛管理
- ↳ Ubuntu中文网上商店