[CentOS] Post postinstall configuration -- Setup Agent (aka firstboot)

Sat Dec 10 02:46:14 UTC 2005
Collins Richey <crichey at gmail.com>

On 12/9/05, Bryan J. Smith <thebs413 at earthlink.net> wrote:
> Matt Lawrence <a400hz at gmail.com> wrote:
> > I'm building kickstart files for use in doing automated
> > installs of various systems.  I would prefer to do fairly
> > minimal amounts of work in the "%post" and postpone further
> > installation and configuration until after the first reboot
> > (or even later).  It should be easy enough to add something
> > to rc.local that will download scripts and run them, but
> I'm
> > wondering if there is a preferred technique.
> > I haven't found anything in the Red Hat documentation I've
> > read so far.
>
> Read up on the Red Hat "Setup Agent" aka "firstboot".
>

An interesting topic. I'm currently building a kickstart procedure for
installing new workstations. We have quite a bit of needed
customization to put a workstation on our network and provide
additional products (updated versions of OpenOffice and Firefox, for
example). This is an RHEL3 level system, so some of the standard
offerings are just too old. My preference is to put everything
possible into %post, and I've packaged the modifications in a
repository which can be NFS mounted at the start of post. All of this
could be easily tweaked when we move to RHEL4. Two functions, however,
have to run at first boot. 1) setting up directories and keys for
system administrators (we use LDAP, so their uid/gid is not known at
%post time, and I don't want to hard code this) 2) installing the
latest ATI video driver for those units with a video not supported by
RHEL3.

What I've done is modelled after the firstboot procedure. I just put a
simple script in rc.local that checks for a script by name, invokes
it, and moves the script to a backup name. Works pretty well for me.

HTH.

--
Collins Richey
      Debugging is twice as hard as writing the code ... If you write
      the code as cleverly as possible, you are, by definition, not
      smart enough to debug it.
             -Brian Kernighan