Incomplete LSB comment. insserv: missing valid name for "Provides:", please add

I recently installed: Debian x86_64, oracle 11g and OCI8. I would like to enable the automatic shell script below, but I got 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# update-rc.d oracle-shm default update-rc.d: using dependency-based boot sequence insserv: script oracle-shm broken: LSB incomplete comment. insserv: missing valid name for "Provides:", please add.

It contains a comment in my configuration file, 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 advise me to solve it? Thank you very much! Marcos

+11
source share
1 answer

I also got the message insserv: missing valid name for 'Provides:' please add... when (re-) some init.d foo service starts. There is a valid Provides line in /etc/init.d/foo , i.e.

 ... # Provides: foo ... 

However, the foo service started normally, despite this error message.

It turned out that insserv or something else seems to be complaining about problems in any init.d script found in the /etc/init.d/** directory, not necessarily the one that is currently running (re-).

Therefore, run the following command to find the problematic init.d scripts:

 cd /etc/init.d/ && sudo grep -rin Provides 

It will list all Provides lines of all scripts found in /etc/init.d/

Check if everyone has a valid name.

In my case, there was a file /etc/init.d/template which had a Provides line with no name.

After I changed the file line using Provides: template Provides :, the insserv error message disappeared.

0
source

All Articles