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! |
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? |
Ended up just running netconfig in the %post section, which worked out great:
%post exec < /dev/tty1 > /dev/tty1 netconfig |
All times are GMT -5. The time now is 10:55 AM. |