I have some services in my init.d folder for e.g. hdfs, zookeeper, elasticsearch, hbase and so on.
Now, I have added all those services to startup by doing the update-rc.d 'service' defaults
command. As we know, hbase can't run if hdfs and zookeeper are not started. So I want to start hdfs first, then zookeeper and then finally hbase.
how do I do this?
Best Answer
update-rc.d(8) enables or disables services, while the ordering of services is handled by insserv(8), and can be customized by editing the LSB header of the service and setting/adding:
In oldest versions, i can do something like this to determine the order:
But after Ubuntu 14, i tried this Ubuntu 16.04 (4.4.0-31-generic):
And doesn't work, always creates the order defined in the header:
Also al try:
Ands seems like ignores all the text after "defaults". I donĀ“t know wath it do when my installation order, I do not think that orders previously installed services.