Re: Using variables in kickstart file

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

 



Ok... let me give it a try.


commandline:
boot: yadda yadda yadda ESXIP=10.0.0.20 ESXVMOTION=10.0.2.20


Kickstart.cfg:

# Regional Settings
keyboard us
lang en_US
langsupport --default en_US
timezone  America/New_York

# Installatition settings
skipx
mouse none
firewall --disabled
# Unencrypted root password: password
rootpw --iscrypted $1$5a17$In5zYe6YsCty76AycpGaf/
reboot
install
url --url http://192.168.3.150/esx/esx301/

# network configuration
%include /tmp/networkinfo

# Partitioning
clearpart --all --drives=cciss/c0d0 --initlabel
part /boot --fstype ext3  --size 250  --ondisk=cciss/c0d0
part swap   --size 1600  --ondisk=cciss/c0d0
part / --fstype ext3  --size 5120  --ondisk=cciss/c0d0
part /var --fstype ext3  --size 2048  --ondisk=cciss/c0d0

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

# Now write them to file:
cat << EOF >> /tmp/networkinfo

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



Any good?
Gabrie


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux