Redhat – Start services after network is ready on Red Hat

redhat

On Ubuntu, to configure a service to start after network is up, you can put a script in your /etc/network/if-up.d/

#!/bin/sh
/etc/init.d/<your service> restart

or something like suggested in this superuser Q/A.

But I dont see the equivalent on Red hat. The only thing I found was using numbers in S/K files. I mean, is this the way to go in red hat?

Best Answer

Yep, that's the right way to go. You should use chkconfig which manages the init scripts for you.

The S?? and K?? numbers determine the priority so you should make sure that your service's number is higher than that of the 'network' (or NetworkManager) service.