加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – insserv:缺少`必需 – 停止:’条目:请添加即使是空

发布时间:2020-12-14 01:28:35 所属栏目:Linux 来源:网络整理
导读:在/etc/init.d/myservice脚本中,我有以下几行 ### BEGIN INIT INFO# Provides: myserviced# Required-Start: $syslog# Required-Stop: $syslog# Should-Start:# Should-Stop:# Default-Start:# Default-Stop:# Short-Description:# Description: Bring up/do
在/etc/init.d/myservice脚本中,我有以下几行

### BEGIN INIT INFO
# Provides: myserviced
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start:
# Should-Stop:
# Default-Start:
# Default-Stop:
# Short-Description:
# Description: Bring up/down service
### END INIT INFO

尽管如此,在执行comman ** / sbin / chkconfig时会省略以下错误消息–add myserviced

insserv: script jexec is broken: incomplete LSB comment.
insserv: missing `Required-Stop:'  entry: please add even if empty.
insserv: script jexec is broken: incomplete LSB comment.
insserv: missing `Required-Stop:'  entry: please add even if empty.
insserv: script jexec is broken: incomplete LSB comment.
insserv: missing `Required-Stop:'  entry: please add even if empty.
insserv: script jexec is broken: incomplete LSB comment.
insserv: missing `Required-Stop:'  entry: please add even if empty.
insserv: script jexec is broken: incomplete LSB comment.
insserv: missing `Required-Stop:'  entry: please add even if empty.
insserv: script jexec is broken: incomplete LSB comment.
insserv: missing `Required-Stop:'  entry: please add even if empty.
insserv: script jexec is broken: incomplete LSB comment.
insserv: missing `Required-Stop:'  entry: please add even if empty.
insserv: script jexec is broken: incomplete LSB comment.
insserv: missing `Required-Stop:'  entry: please add even if empty.
insserv: script jexec is broken: incomplete LSB comment.
insserv: missing `Required-Stop:'  entry: please add even if empty.
insserv: script jexec is broken: incomplete LSB comment.
insserv: missing `Required-Stop:'  entry: please add even if empty.
myserviced          0:off  1:off  2:off  3:on   4:off  5:on   6:off

我读过Incomplete LSB comment. insserv: missing valid name for `Provides:’ please add的帖子.但没有帮助.

此错误在SUSE 11上发生,但在Rehat-6上不发生

解决方法

确保您的破折号符合预期.在我正在做的一些复制粘贴中,解释器没有看到预期的字符.
从字面上看,这个

# Required-Start:    $remote_fs $syslog $time 
# Required-Stop:     $remote_fs $syslog $time 
# Should-Start:      $network $named slapd autofs ypbind nscd nslcd 
# Should-Stop:       $network $named slapd autofs ypbind nscd nslcd

成了这个:

# Required--Start:    $remote_fs $syslog $time 
# Required--Stop:     $remote_fs $syslog $time 
# Should--Start:      $network $named slapd autofs ypbind nscd nslcd 
# Should--Stop:       $network $named slapd autofs ypbind nscd nslcd

我从包含一个看似不可打印的字符的pdf复制的第一组.我手动输入 – 并且它有效.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读