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.
...
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.
source share