Re: Extracting variables from within ks.cfg, interpreted from command-line

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

 



On Monday 20 March 2006 15:05, Dan Trainor wrote:
> What kind of "bad luck" have you found?  I'm still hot after this one,
> and it's really bothering me.
>
> Bash is available to me in %pre, yes?  This stuff would even work in sh,
> as far as my testing shows.
>
> %pre does get parsed before my network info is used with the 'network'
> directive in my kickstart file, right?

So what I ended up doing was using python.  Python is there because anaconda 
uses it.  %pre can use the network as supplied on how to get the ks file or 
the content itself.  Not necessarily the same network info supplied in the 
'network' section as that is used for the installed system, not for the 
installer.  I personally do PXE booting and get the ks config file from a 
webserver, so the environment already has network going.  I pull down a pre 
script from a webserver (use IP as DNS does not work in install env), then 
execute the python prescript to parse /proc/cmdline for arguments that will 
lead to stub files getting created.  Later in the kickstart script those stub 
files are included for the various things.

Here is a really ugly early version of this script.  I can't find the latest 
one I was responsible for, but here ya go:

http://geek.j2solutions.net/stuff/autokickrhel4.py

-- 
Jesse Keating RHCE      (geek.j2solutions.net)
Fedora Legacy Team      (www.fedoralegacy.org)
GPG Public Key          (geek.j2solutions.net/jkeating.j2solutions.pub)

Attachment: pgpVOWzX1Sth8.pgp
Description: PGP signature


[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