grabbing ip address from kickstart pre

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



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

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux