LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 03-27-2007, 05:25 PM   #1
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Rep: Reputation: 31
Change IP address after using a kickstart file


I've cerated a custom installation CD with a kickstart file that fits my needs. Almost.
I need to define the IP address, and I realize that kickstart does not offer this functionality. I tried to add this to my /etc/rc3.d/S99local file:
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

But that didn't work - I'm assuming because I can't interact with the user at this point in the runlevel. Is there ANY workaround for this, without having to define the IP in the kickstart or in the install options? I'd like to be able to change the IP sometime up to the first boot, as the machine will then download some packages from the Internet (and a DHCP server is unavailable)
Thanks in advance for any advice!
 
Old 03-29-2007, 03:57 PM   #2
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Original Poster
Rep: Reputation: 31
I tried to pipe system-config-network into TTY3 during the kickstart phase, but that produced bad screen results and died as well. Here's what I tried:
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
system-config-network
fi
if [ $REPLY = "n" ]; then
echo "Alright, leaving DHCP enabled."
fi

I also tried to pipe that out to TTY1 and that was even worse.... What does anyone think of fooling kudzu into thinking the network card hasn't been set up yet? Anyone know how to do this?
 
Old 03-30-2007, 12:10 PM   #3
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Original Poster
Rep: Reputation: 31
Ended up just running netconfig in the %post section, which worked out great:

%post
exec < /dev/tty1 > /dev/tty1
netconfig
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
regarding kickstart file gimmereeson Linux - Server 1 01-14-2007 07:43 AM
missing kickstart file prince2242002 Red Hat 1 10-02-2006 12:28 PM
set the IO address of the serial port of my computer to 0x3e8 during kickstart stage powah Linux - Hardware 0 09-21-2006 05:03 PM
What file to modify to change a mac address or to save eth0 configuration ikw38 Linux - Networking 2 04-26-2006 04:52 PM
Problems mounting CD in Kickstart file rocs78 Fedora 1 04-10-2005 08:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration