1

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.

Justin
  • 5,328
  • 19
  • 64
  • 84

1 Answers1

0

I believe /etc/rc.local is a symlink to /etc/rc.d/rc.local.

Stefan Moser
  • 177
  • 1
  • 9
Justin
  • 5,328
  • 19
  • 64
  • 84
  • 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. –  Mar 22 '13 at 14:27