I can get the kickstart command line with /proc/cmdline
it looks something like xxxxx ks=http://192.168.1.8/ks/ks.cfg xxxxxx in the %pre sections of my ks.cfg I was wanting to extract the IP from the ks= part. I was going to utilize the "tr" command but its not available in %pre.
how can I go about extracting the IP address from with in the %pre section
I was going to do something like: cat /proc/cmdline | tr ' ' '\n' | grep ks=http | tr '/' ' ' | awk {' print $2'}
Since tr isnt available how else can I do it?
Thanks,
Jerry
On Sun, 14 Aug 2011, Joseph L. Casale wrote:
The thing is if it's in the %pre section, AWK would not have been installed yet?
Kind Regards,
Keith Roberts
On Sun, 14 Aug 2011, Joseph L. Casale wrote:
That's interesting Joe. So where are these tools being gotten from if the RPM packages are not installed yet?
Is there some way to find out exactly what tools are available for use in the %pre section please?
Kind Regards,
Keith Roberts
----------------------------------------------------------------- Websites: http://www.karsites.net http://www.php-debuggers.net http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------
On Mon, 15 Aug 2011, Keith Roberts wrote:
That's interesting Joe. So where are these tools being gotten from if the RPM packages are not installed yet?
It's part of the installer.
Is there some way to find out exactly what tools are available for use in the %pre section please?
It's part of the pre-installation environment. Boot off the install CD, wait until you can get to the F2 shell, and peek around at what you've got.
jh
On Mon, 15 Aug 2011, John Hodrien wrote:
Hi Joe. Thanks for that helpfull information. I will do just that one day - it's a very handy thing to know about!
Kind Regards,
Keith Roberts
----------------------------------------------------------------- Websites: http://www.karsites.net http://www.php-debuggers.net http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------
On 2011-08-15 09:06, Keith Roberts wrote:
Is there some way to find out exactly what tools are available for use in the %pre section please?
http://linuxtopia.org/online_books/rhel6/rhel_6_installation/rhel_6_installa...
/THomas
On Mon, 15 Aug 2011, Thomas Johansson wrote:
OK thanks for that Thomas.
I've saved this email for later reference.
Keith
----------------------------------------------------------------- Websites: http://www.karsites.net http://www.php-debuggers.net http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------
Since tr isnt available how else can I do it?
Check out page 21 of this pdf: http://www.redhat.com/promo/summit/2010/presentations/summit/decoding-the-co...
Interesting, while the awk solution is more appropriate for your need, this can make it easier and allow for other options:
echo $ks |cut -d'/' -f3 after running the above...
On Sun, 14 Aug 2011, Joseph L. Casale wrote:
Nice tutorial Joe. I've downloaded that for later.
Kind Regards,
Keith Roberts
----------------------------------------------------------------- Websites: http://www.karsites.net http://www.php-debuggers.net http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------