0

I am testing under: Centos 6.8

If I do man chkconfig there is a section saying the following:

chkconfig also supports LSB-style init stanzas, and will apply them in preference to "chkconfig:" lines where available. A LSB stanza looks like:

### BEGIN INIT INFO
# Provides: foo
# Required-Start: bar
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Foo init script
### END INIT INFO

I am adding the following inside /etc/init.d/myservice

### BEGIN INIT INFO
# Provides: myservice
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO

chkconfig --add myservice does not complaint, but only adds /etc/rc.d/rc.*/K* softlinks, for all runlevels (not just 0 1 6). This seems to me like the section is completely is ignored.

If I remove Default-Stop and execute: chkconfig myservice reset I get an error:

service loservice does not support chkconfig

From this I can understand that chkconfig actually reads the specific tags.

My question is: does Centos utilize ### BEGIN INIT INFO section at all, and if yes how?

P.S. When I add the line: # chkconfig: 2345 85 15 at the beginning and execute chkconfig myservice reset, the S* and K* softlinks are generated correctly fir each associated runlevel.

put on hold as unclear what you're asking by Jeff Schaller 2 days ago

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Looks like you have a typo there... Shouldn't it be "Default-Start" instead of "Defalt-Start"? It's possible the documentation you were consulting was incorrect... Still, I'd expect it to work if you use the correct spelling. – filbranden Oct 17 '18 at 16:45
  • 1
    You mis-spelled Default-Start as Defalt-Start. – JRFerguson Oct 17 '18 at 16:46
  • Thanx: I'll soon check whether this was causing the problem – Marinos An Oct 17 '18 at 17:41