Passing a variable to ks.cfg

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

 



Hello All,

I am doing an NFS kickstart with Redhat 7.1.

I am going to be installing on systems with 1 or 2 drives that are either
SCSI or IDE.  I need to differentiate between SCSI and IDE for something I
am doing in the %post section and I need to know whether there are 1 or 2
drives so I know how many drives to partition.  I would like to be able to
create just 1 ks.cfg file with some logic in it that can handle all the
possible situations.

My thought is that in my syslinux.cfg file I could have four options (an
example below) and then pass in a variable (not sure how to do this) to
help me distinguish between the different cases.

label oneidedrive
  kernel vmlinuz
  append ks=nfs:10.1.1.1:/redhat.disks/ks.cfg initrd=initrd.img network

label onescscidrive
  kernel vmlinuz
  append ks=nfs:10.1.1.1:/redhat.disks/ks.cfg initrd=initrd.img network

label twoidedrives
  kernel vmlinuz
  append ks=nfs:10.1.1.1:/redhat.disks/ks.cfg initrd=initrd.img network

label twoscsidrives
  kernel vmlinuz
  append ks=nfs:10.1.1.1:/redhat.disks/ks.cfg initrd=initrd.img network

Then in the ks.cfg file I could say something like:
If variable1
  partition for one drive
else
  partition for two drives

and in the %post section
If variablescsi
  do scsi stuff
else
  do ide stuff

Is it possible to pass something to the ks.cfg file?  How do you do that?
Or does anyone have any better ideas on how to do this?

Thank you,
Rebecca





[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