Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running CentOS and want to execute a command when the system is booted. Reading other posts on ServerFault the recommend file to use is rc.local. However, rc.local exists in both /etc/ and /etc/rc.d/. Which file should I use, and what is the difference between the two?

Thanks.

share|improve this question
1  
/etc/rc.local is a symlink to /etc/rc.d/rc.local –  Laurentiu Roescu Mar 22 '13 at 13:43
add comment

1 Answer

I am retarded, /etc/rc.local is a symlink to /etc/rc.d/rc.local.

share|improve this answer
    
Just put everything before the "exit 0" and your are good to go :) . Try to use full path of the comands like "/sbin/iptables" for example to avoid problems. –  nwildner Mar 22 '13 at 14:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.