Using variables in kickstart file

Gabrie thegabeman at gmail.com
Wed Jul 18 21:16:40 UTC 2007


On 7/18/07, Shabazian, Chip <Chip.Shabazian at bankofamerica.com> wrote:
> boot: yadda yadda yadda ESXIP=10.0.0.20 ESXVMOTION=10.0.2.20
>
> %pre (and %post if needed)
> ESXIP=`awk -F "ESXIP=" '{print $2}' /proc/cmdline | cut -d " " -f 1`
> ESXVMOTION=`awk -F "ESXVMOTION=" '{print $2}' /proc/cmdline | cut -d " "
> -f 1`
>
> Yea, Yea, Yea, there are more elegant ways to do this, but this should
> work for you
>

Ok, thanks.
But only in %pre and %post ????

So this will NOT work?

%pre
ESXIP=`awk -F "ESXIP=" '{print $2}' /proc/cmdline | cut -d " " -f 1`
ESXVMOTION=`awk -F "ESXVMOTION=" '{print $2}' /proc/cmdline | cut -d " " -f 1`

# Network Configurations
network --device eth0 --bootproto static --ip $ESXIP --netmask 255.255.255.0


Or in other words.... is the network-line part of the %pre section????

Gabrie




More information about the Kickstart-list mailing list