Re: how do I run something on a newly installed server, on it's 1st boot only?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Michel van Deventer wrote:
Hi,

you can use the %post part of the kickstart for that, then your script
will run after installation is complete but before the reboot. If you
need to run it after the first reboot, I'd put it in /etc/rc.d/rc.local
and let it remove itself after running succesfully. And of course copy
the script to the server using the %post part of kickstart ;)


i was going to suggest building an RPM which installs a script in /etc/init.d and enables it in rc1.d-rc3.d, this script checks to see if its run before, and if not, it runs, does its thing, then sets some kind of marker saying "been there, done that", and disables itself with `chkconfig servicename off`

this way the script could be run early in the init sequence (by using a low S?? in the symlink) or late, as you so need.




_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux