On Tue, Feb 4, 2014 at 2:32 PM, Steve Clark <sclark at netwolves.com> wrote: > >> >>> 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 - If what you are really doing is the equivalent of cloning images, you might look at clonezilla, or the backup/restore package called rear (in EPEL). But for a quick brute-force change, you could probably edit /etc/init/rcS-sulogin.conf and add the script you want to replace /sbin/sushell. -- Les Mikesell lesmikesell at gmail.com