static ips and automation

Donald Murray, P.Eng. donaldm314 at gmail.com
Wed Feb 15 19:41:32 UTC 2006


On 2/15/06, Joe Van Dyk <joevandyk at gmail.com> wrote:
> On 2/14/06, Shabazian, Chip <Chip.Shabazian at bankofamerica.com> wrote:
> > You can give the system it's IP information on the boot: line... (IP=
> > NETMASK= GATEWAY=) then get that information in %pre, create a network
> > line, and viola, you have a static entry that is dependent on the boot:
> > options
>
> Sorry for the dumb question, but the documentation I'm looking at
> doesn't seem to have the information on how to access commands given
> on the boot line in the %pre and %post scripts.  Could you give an
> example or point me to better documentation?
>
> Thanks!
> Joe
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>

I use something like the following in %post:
cat /proc/cmdline | sed 's/ /\
/g' | grep ^psi_ | grep = > /tmp/psi_args
. /tmp/psi_args

If I append 'psi_foo=bar' onto the kickstart command-line, the variable psi_foo
will be set to bar.

Hope that helps.




More information about the Kickstart-list mailing list