dan wrote:
Klaus Steden wrote:
Hi All,
Is it possible to access the boot: prompt options in the %pre and %post
scripts? As in, if on my bootprompt I have:
linux ks=http://some.host/some.file -ip=1.2.3.4
that I can then use the value of "-ip=" in the kickstart script itself?
Christian,
You can access these parameters by reading /proc/cmdline.
The contents of this file are read-only, and contain all the boot
args except
those that get used (and thus eaten) by the kernel (i.e. initrd=<initrd>
etc.).
It'll take a little bit of perl, awk, python, sed, or shell to turn
them into
something useful, but they're there if you need them.
hth,
Klaus
Klaus -
That is awesmoe. I will most definately be using that.
Something like this should work.
eval export `cat /proc/cmdline | tr ' ' '\012' | grep =`
This will set a variable for all values containing an = that get passed
to the kernel.
Michael
Disclaimer: The content of this message is my personal opinion only and
although I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak on
behalf of Intel on this matter.