LSB评论不完整. insserv:缺少“提供者"的有效名称:请添加 [英] Incomplete LSB comment. insserv: missing valid name for `Provides:' please add
问题描述
最近我安装了:Debian x86_64,oracle 11g和OCI8.我想自动将下面的shell脚本打开,但是收到以下消息错误:
recently I installed: Debian x86_64, oracle 11g and OCI8. I'd like to turn automatic the shell script below, but I received the following message error:
root @ debian:/etc/init.d# uname -a Linux debian 3.2.0-4-amd64#1 SMP Debian 3.2.54-2 x86_64 GNU/Linux
root@debian:/etc/init.d# uname -a Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux
root @ debian:/etc/init.d# update-rc.d oracle-shm默认值 update-rc.d:使用基于依赖项的启动顺序 insserv:脚本oracle-shm损坏:LSB注释不完整. insserv:缺少提供者"的有效名称:
root@debian:/etc/init.d# update-rc.d oracle-shm defaults update-rc.d: using dependency based boot sequencing insserv: Script oracle-shm is broken: incomplete LSB comment. insserv: missing valid name for `Provides:' please add.
在查看我的配置文件时,它具有必要的注释,如下所示.
Looking my configuration file it has the comment necessary, as you can see below.
#! /bin/sh
case "$1" in
start)
echo "Starting script /etc/init.d/oracle-shm"
# Run only once at system startup
rm -rf /dev/shm
mkdir /dev/shm
mount -t tmpfs shmfs -o size=2048m /dev/shm
touch /dev/shm/.oracle-shm
;;
stop)
echo "Stopping script /etc/init.d/oracle-shm"
echo "Nothing to do"
;;
*)
echo "Usage: /etc/init.d/oracle-shm {start|stop}"
exit 1
;;
esac
#
### BEGIN INIT INFO
# Provides: oracle-shm
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Bind /run/shm to /dev/shm at system startup.
# Description: Fix to allow Oracle 11g use AMM.
### END INIT
您能指导我解决吗?非常感谢!马可斯
Could you please guide me to solve it? Thanks a lot! Marcos
推荐答案
(重新)启动某些init.d服务foo
时,我还收到了消息insserv: missing valid name for 'Provides:' please add ...
.文件/etc/init.d/foo
确实具有有效的Provides
行,即:
I also received the message insserv: missing valid name for 'Provides:' please add ...
when (re-)starting some init.d service foo
. File /etc/init.d/foo
did have a valid Provides
line, i.e.:
...
# Provides: foo
...
尽管如此,尽管出现错误消息,服务foo
仍能正常启动.
Nevertheless, service foo
started fine despite that error message.
事实证明,insserv或其他任何东西似乎抱怨目录/etc/init.d/**
中找到的任何 init.d脚本中的问题,不一定是当前正在(重新)启动的脚本.
It turned out that insserv or whatever seems to complain about problems in any init.d script found in directory /etc/init.d/**
, not necessarily the one that is currently being (re-)started.
因此,执行以下命令以查找有问题的init.d脚本:
Therefore, execute the following command to find problematic init.d scripts:
cd /etc/init.d/ && sudo grep -rin Provides
它将列出在/etc/init.d/
检查是否所有人都提供了有效的姓名.
Check whether all of them have a valid name provided.
在我的情况下,有一个文件/etc/init.d/template
在其Provides
行中没有名称.
In my case, there was a file /etc/init.d/template
which had a Provides
line without a name.
用Provides: template
更改该文件的行后,insserv错误消息消失了.
After I changed that file's line with Provides: template
, the insserv error message disappeared.
这篇关于LSB评论不完整. insserv:缺少“提供者"的有效名称:请添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!