1

I'd like to make a firstboot script for CentOS 5/6 and Ubuntu 12.04/12.10/14.04. If possible, I'd like to use one method to trigger this script to run.

From what I can tell, this rules out chkconfig, firstboot file, upstarts jobs, etc. I'm a bit confused with the plethora of terminology/technology. Is there one method I can use for all these platforms that will run a small script on first boot (after other services is fine)?

3

You could use /etc/rc.local, it is present on all of the systems you mention. It is executed after all of the other initialisation scripts, see the comments in the file for more information.

| improve this answer | |
  • Perfect! I noticed that /etc/rc.local is a symlink on CentOS, and for my purpose I had to update the original file at (etc/rc.d/rc.local) – Hamy Jul 2 '14 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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