Changing IP address during kickstart

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
jakev383
Posts: 25
Joined: 2006/03/27 00:59:55

Changing IP address during kickstart

Post by jakev383 » 2007/03/29 21:34:36

I've been searching for a few days for this now.... I'm building a Cent install CD for our OSS project (www.qmailtoaster.com), and not all of the users who will be using this will be using DHCP addresses. I know I can have them define the IP on the boot line before the kickstart is loaded, bt I was hoping on a way to do this during the kickstart process itself. I tried to run system-config-network (piping output to TTY3) but that came out garbled and didn't work. Here's what I tried:

[code]
exec < /dev/tty3 > /dev/tty3
echo " The system is currently set for DHCP."
echo " Do you want to change this? [y/n] (enter=n)"
echo ""
read REPLY
if [ -z $REPLY ]; then REPLY="n"; fi
if [ $REPLY = "y" ]; then
/usr/bin/system-config-network
fi
if [ $REPLY = "n" ]; then
echo "Alright, leaving DHCP enabled."
fi
[/code]
I also tried piping it to TTY1 which was even worse.
I also tried to run the same program (system-config-network) by appending it to the /etc/rc3.d/S99local file but that failed as well. I'm assuming that I cannot interact with the user at that point in the runlevel.
Can anyone give any pointers? I'm going to try asking some questions in the %post section and assigning them to variables this weekend and then overwrite the ifcfg-eth0 file to see if I can get it to work that way.
Any help is appreciated!

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Changing IP address during kickstart

Post by gerald_clark » 2007/03/30 13:17:39

Why not run netconfig?

jakev383
Posts: 25
Joined: 2006/03/27 00:59:55

Re: Changing IP address during kickstart

Post by jakev383 » 2007/03/30 17:08:08

[quote]
gerald_clark wrote:
Why not run netconfig?[/quote]
Thanks, that one worked perfectly.
Appreciate it!

shruthi
Posts: 1
Joined: 2010/03/25 06:11:41

Re: Changing IP address during kickstart

Post by shruthi » 2010/03/25 06:18:22

please can anyone tell how to run netconfig in %pre instead of /usr/bin/system-config-network because its not working properly for me also :-(

n i dono to run netconfig

please do provide me the required instruction

its urgent..........

vstrabello
Posts: 36
Joined: 2008/03/14 15:11:25
Location: Campinas, SP, Brazil
Contact:

Re: Changing IP address during kickstart

Post by vstrabello » 2010/03/27 23:40:08

Why not add the following statement on your kickstart file?

http://wiki.centos.org/TipsAndTricks/KickStart?highlight=%28bootproto%3Dquery%29

But.. I'm not sure how it behaves if there's a system with one more NIC...

Regards

Post Reply

Return to “CentOS 4 - Server Support”