On 12/9/05, Bryan J. Smith <thebs413 at earthlink.net> wrote: > Read up on the Red Hat "Setup Agent" aka "firstboot". > > There is a "firstboot" init script (e.g., > /etc/init.d/firstboot) that looks for select files (e.g., > /etc/sysconfig/firstboot). Depending whether it exists or > doesn't exist, the firstboot init script -- if set to start > for the run-level -- does or doesn't do something. It will > then create/delete the file at the end of the run, as > appropriate, to prevent it from running next time. The firstboot package has various dependencies that I don't really want. But it could be a good model. > It's much easier just to plunk down 2 files -- one in > /etc/init.d/ and one in /etc/sysconfig/ (or wherever you want > to put it). You can do put those commands to copy those > files in the "%post" section. Or you can put them in their > own RPM too, including running "chkconfig --level" to > enable/disable it's execution at start-up as part of the RPM. Given the limitations of what can actually be run during the %post phase, I'm not sure if it is easier. There are warnings about lack of name resolution if the system is configured for DHCP. While it is possible for me to install a custom package before the first reboot, mixing it in with all the CentOS packages in the install server seems to be a really bad idea. With the potential lack of name resolution, the other option would be to install via FTP, but that requires hardcoding the IP address. Not a great idea either. > There are a lot of options. I just find (and this is just my > experience/preference), that the little extra time in > creating an /etc/init.d/ script (with a simple > start|stop|status parameter) and associated config/flag file, > is a lot easier and less ambiguous than running "echo >>" or, > better yet, "sed -e" on /etc/rc.d/rc.local. Good point, but how do you suggest I bootstrap it in? -- Matt