Re: Forcing kickstart to ask for network configuration

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

 



	The following works with redhat 7.3 to allow entering static ip
configuration.  I haven't tested with 8 or 9.  

	Use this network line:

network --device eth0 --bootproto query

The query option, (undocumented for 7.3 I think, so it may have gone
away in subsequent releases) brings up the network configuration window
in the first stage of the install.  For some reason, this info is not
communicated to anaconda in the second stage, so it needs a little help
in the %pre section, to rewrite the network line in the copy of ks.cfg
that is written to the hard drive:

------------------------
%pre

get()  {
        grep $1 /tmp/netinfo |cut -d'=' -f2
}
device=`get DEVICE`
ip=`get IPADDR`
netmask=`get NETMASK`
host=`get HOSTNAME`
gateway=`get GATEWAY`
nameserver=`grep  nameserver /etc/resolv.conf`
line="network --bootproto static --device $device --ip $ip --netmask
$netmask --hostname $host --gateway $gateway --$nameserver"
ks="/tmp/ks.cfg"
sed -e "/^network/s/^network.*/$line/" $ks >${ks}.tmp && mv ${ks}.tmp
$ks
-------------------------
(Note that the last two lines begin with "line=" and "sed -e"
respectively. There should be no line breaks. And of course those are
backticks around the `get xxx`'s and `grep nameser...`) 

HTH,
Ed




On Thu, 2003-09-11 at 16:24, Holger Kiehl wrote:
> Hello
> 
> Is there a way to force kickstart to ask the user for the network information?
> 
> Thanks,
> Holger
> 
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/kickstart-list
> 





[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