Ed Brown wrote:
Gabrie wrote:
So, if I get this right.... I can use /proc/cmdline to read the
command line that kickstart has been called from and use the output in
the kickstart file (network section)?
No, you can't just use variables in the network line.
And I don't believe that you will be able to insert or include or modify
the network line parameters during %pre. Yes, this works for packages
and partitioning, but I think it's too late for network parameters. Now
I could be wrong, maybe that is not true for dhcp or cd-based installs.
(You haven't said what your install method is, though you mentioned a
dhcp server in passing.)
as chip mentioned, this technique does work and is rather useful.
i believe the only things that cannot be pulled in via %include
are the line in the kickstart file which specifies either install
or upgrade, the %packages line (but package lists can be %included),
the %pre section, and the %post line (not sure if %post script
text can be included or not). at some point or another i've used
%include for almost every kickstart command as well as package
lists or partial package lists (e.g. use %pre to determine machine
architecture and install specific packages based on this).
the install/upgrade lines or information in them cannot be created
in a %pre script because anaconda has to locate the second stage
image based on this information, and %pre runs after the second
stage image has been loaded so it can take advantage of all the
extra tools located there (sed, awk, perl, etc.).
chris