Linux Tips I Wish I Knew Long Ago – /etc/rc.local executes last

Need a server to do something when it’s fully up and ready? Perhaps check in to a worker-processer queue, or monitoring, or maybe starting something once the network is good to go. You can mess with start-up scripts and the S99 numbering in /etc/rc.d or just use /etc/rc.local. From some more official documentation, http://www.netbsd.org/docs/guide/en/chap-rc.html

/etc/rc.local is almost the last script called at boot up. This script can be edited by the administrator to start local daemons that don’t fit the rc.d model.”

I use this all the time to set hostnames, check-in to clusters, kick off scripts and jobs on a server or even notify me when a server is ready. Super handy.

Leave a Reply

Your email address will not be published. Required fields are marked *