P
P
Pavel Kityan2016-05-06 01:38:42
linux
Pavel Kityan, 2016-05-06 01:38:42

Why does update-rc.d ignore Required-Start and Required-Stop?

It took its own service to set dependencies on mysql, which was done in the init script:

# Provides:          my_server
# Required-Start:    mysql
# Required-Stop:     mysql
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6

By default, in ubuntu (at least for me - so) the mysql startup script is not through rc.d, but in /etc/init/mysql.conf
Although there is also a script for rc.d in /etc/init.d, however there are no links to it.
I removed /etc/init/mysql.conf and set mysql startup like this:
update-rc.d mysql defaults
And then my
update-rc.d mysql my_server script
So, the dependencies were ignored and click on mysql, on my_server received K20 and S20.
I had to do it like this:
update-rc.d mysql my_server 21 19
But why is that? Why ignore? In mysql init script:
# Provides: mysql

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Slava Kryvel, 2016-05-06
@kryvel

what version of ubuntu? in the same place now systemd or upstart ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question