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

Re: Hacking anaconda for RHL 7.3



Or you can put this in a %post script...

<--- ifcfg_fix.sh --->
# Description:
#	The 'query' option on the Anaconda installer leaves the ifcfg-eth0
script
#	in an unusable state
#	If the 'dhcp' option is chosen
#		DEVICE=eth0
#		BOOTPROTO=query (this is illegal)
#		ONBOOT=no	(keeps the nic from coming up)
#	If the 'static' option is chosen
#		DEVICE=eth0
#		BOOTPROTO=query (this is illegal)
#		IPADDR=<what the user selected)
#		NETMASK=<what the user selected)
#		ONBOOT=yes

IFSCRIPT="/etc/sysconfig/network-scripts/ifcfg-eth0"
[ -f $IFSCRIPT ] && {
	cp $IFSCRIPT /tmp/ifcfg.$$
}
QF=`grep IPADDR /tmp/ifcfg.$$ | wc -l`
[ $QF -eq 0 ] && {
	# we have a dhcp box
	sed -e 's/query/dhcp/' -e 's/ONBOOT=no/ONBOOT=yes/' /tmp/ifcfg.$$ >
$IFSCRIPT
}
[ $QF -ne 0 ] && {
	# we have a static box
	sed -e 's/query/static/' /tmp/ifcfg.$$ > $IFSCRIPT
}
rm -f /tmp/ifcfg.$$
On 10 Nov 2003, Ed Brown wrote:

> Leaving the network configuration line out of ks.cfg (7.x) will not
> result in bringing up a configuration screen for the info. It will
> attempt dhcp and failing that it will kick you out of kickstart into a
> manual install. 
> 
> There is not a documented way to do what you ask but it can be done for
> 7.x. See previous posts at:
> http://www.redhat.com/archives/kickstart-list/2003-September/msg00045.html
> http://www.redhat.com/archives/kickstart-list/2003-September/msg00046.html
> 
> 
> 
> 
> On Fri, 2003-11-07 at 07:42, Paul Pianta wrote:
> > Cosby, Christopher wrote:
> > 
> > > I'd love for the install to pop up, ask the user for hostname, ip 
> > > addresses, etc, and then continue with the kickstart.  Where do I need 
> > > to start?
> > >
> > you only need to NOT put an entry in your kickstart file for networking. 
> > If anaconda finds something missing from a kickstart file - it will 
> > prompt the user for input ...
> > 
> > leave out any lines that look like:
> > network --device eth0 --bootproto static --ip 192.168.0.254 --netmask 
> > 255.255.255.0 --hostname woogawooga
> > 
> > and you will get the config screen youre looking for - (depending on 
> > which install method you chose - it will be a text-based screen or a 
> > nice gui).
> > 
> > 
> > _______________________________________________
> > Anaconda-devel-list mailing list
> > Anaconda-devel-list redhat com
> > https://www.redhat.com/mailman/listinfo/anaconda-devel-list
> 
> 
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
> 
> 

------------------------------------------------------------------------
Jim Wildman, CISSP, RHCE                                jim rossberry com
http://www.rossberry.com




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