On 02/04/2014 03:17 PM, m.roth@5-cent.us wrote:
Steve Clark wrote:
Hello List,
I want to boot into single user mode and run a script automatically.
<snip>
How often - every time, or just once? If every time, create a script and put it in /etc/init.d/, with a link to /etc/rc1.d, or use whatever it is in systemd's analog.
mark
Everytime. We have a USB key that has a tarfile of CentOS and our software on it The script partitions the hard drive and untars the tarfile - this takes about 2 minutes vs using a custom kickstart file which takes 20 to 30 minutes.
So we build a CentOS respin iso image along with our software - install it into a virtual machine and at the end of the install the ks file creates a tarfile from the new image. We then move this image to the USB key.
In CentOS 5.x all I had to do was create a .profile file in / and it would get ran. CentOS 6.x doesn't run the .profile -