I need to run some bash script only once on first boot (after OS installation) of my CentOS machine This script should run before network service start (because this script will change network configuration) How can I register my script to run before network service start?
If you look at the "chkconfig" line of /etc/init.d/network you'll see that the network has a start priority of "10".
Some versions of CentOS/RHEL/Fedora have a "firstboot" program you could try to use, but that seems like a pain.
You sure you can't run your network reconfiguration script inside of a %post in a kickstart? That's what I do.
Simple answer: Stick it in
This also lets you delete the file to force the script to run again later.