问题描述
在安装java的linux系统中,安装多路径时,或者使用chkconfig添加或删除系统服务时。提示insserv: Script jexec is broken
告警信息
linux-n8tv:/home/syf
# chkconfig -a ultrapath
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.
ultrapath 0:off 1:off 2:off 3:on 4:off 5:on 6:off
处理过程
1
insserv程序的作用是什么?
答:insserv是用来管理linux服务的,它决定了哪些服务需要在什么时候开启或者停止以及这些服务的启动停止顺序。
2
java的错误,怎么和UltraPath扯上联系了?
答:insserv的所有配置信息都放置在/etc/init.d目录下,每次运行chkconfig来启动或停止服务时,insserv就会将/etc/init.d目录下的所有配置信息都搜索一遍。所以,只要/etc/init.d中存在一个配置不正确的脚本,就会报错。
解决方案
将/etc/init.d/jexec中的如下内容中,添加# Required-Stop:
###
BEGIN INIT INFO
# Provides:
binfmt_misc
#
Required-Start: $local_fs
#
Default-Start: 1 2 3 4 5
#
Default-Start: 0 6
#
chkconfig: 12345 95 05
#
Description: Supports the direct execution of binary formats.
###
END INIT INFO
添加后的效果:
###
BEGIN INIT INFO
#
Provides: binfmt_misc
#
Required-Start: $local_fs
#
Default-Start: 1 2 3 4 5
#
Required-Stop:
#
Default-Start: 0 6
#
chkconfig: 12345 95 05
#
Description: Supports the direct execution of binary formats.
###
END INIT INFO