Re: [CentOS] grabbing ip address from kickstart pre

2011-08-15 Thread Keith Roberts
On Mon, 15 Aug 2011, Thomas Johansson wrote: > To: CentOS mailing list > From: Thomas Johansson > Subject: Re: [CentOS] grabbing ip address from kickstart pre > > On 2011-08-15 09:06, Keith Roberts wrote: >> >> Is there some way to find out exactly what tools are

Re: [CentOS] grabbing ip address from kickstart pre

2011-08-15 Thread Keith Roberts
On Mon, 15 Aug 2011, John Hodrien wrote: > To: CentOS mailing list > From: John Hodrien > Subject: Re: [CentOS] grabbing ip address from kickstart pre > > On Mon, 15 Aug 2011, Keith Roberts wrote: > >> That's interesting Joe. So where are these tools being >&

Re: [CentOS] grabbing ip address from kickstart pre

2011-08-15 Thread Thomas Johansson
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_installation_s1-redhat-config-kickstart-prescript.html /THomas

Re: [CentOS] grabbing ip address from kickstart pre

2011-08-15 Thread John Hodrien
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 par

Re: [CentOS] grabbing ip address from kickstart pre

2011-08-15 Thread Keith Roberts
On Sun, 14 Aug 2011, Joseph L. Casale wrote: > To: 'CentOS mailing list' > From: Joseph L. Casale > Subject: Re: [CentOS] grabbing ip address from kickstart pre > >> Since tr isnt available how else can I do it? > > Check out page 21 of this pdf: > ht

Re: [CentOS] grabbing ip address from kickstart pre

2011-08-15 Thread Keith Roberts
On Sun, 14 Aug 2011, Joseph L. Casale wrote: > To: 'CentOS mailing list' > From: Joseph L. Casale > Subject: Re: [CentOS] grabbing ip address from kickstart pre > >> The thing is if it's in the %pre section, AWK would not have >> been installed yet? >

Re: [CentOS] grabbing ip address from kickstart pre

2011-08-14 Thread Joseph L. Casale
>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-code/wed/cshabazi-530-more/MORE-Kickstart-Tips-and-Tricks.pdf Interesting, while the awk solution is more appropriate for your need, this can mak

Re: [CentOS] grabbing ip address from kickstart pre

2011-08-14 Thread Joseph L. Casale
>The thing is if it's in the %pre section, AWK would not have >been installed yet? I wouldn't have suggested it if it would not have worked. Awk *is* available in %pre. As the op noted, tr is not available but several tools like awk,gawk,grep,fgrep,egrep,wget etc are.

Re: [CentOS] grabbing ip address from kickstart pre

2011-08-14 Thread Thomas Johansson
On 2011-08-13 04:26, Jerry Geis wrote: > I can get the kickstart command line with /proc/cmdline > > it looks something like x ks=http://192.168.1.8/ks/ks.cfg xx > 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" comma

Re: [CentOS] grabbing ip address from kickstart pre

2011-08-14 Thread Keith Roberts
On Sun, 14 Aug 2011, Joseph L. Casale wrote: > To: 'CentOS mailing list' > From: Joseph L. Casale > Subject: Re: [CentOS] grabbing ip address from kickstart pre > >> how can I go about extracting the IP address from with in the %pre section >> >> I was

Re: [CentOS] grabbing ip address from kickstart pre

2011-08-14 Thread Joseph L. Casale
>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? Jerry, You ever solve this? You can do this all wit

[CentOS] grabbing ip address from kickstart pre

2011-08-12 Thread Jerry Geis
I can get the kickstart command line with /proc/cmdline it looks something like x ks=http://192.168.1.8/ks/ks.cfg xx 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 a