kickstart output/input

Hello Linux gurus!

Ive got a RedHat EnterP. 4 kickstart server that is also running RedHat EnterP 4.
It is working as i should and no problem at all.
However, now i want to run a little script with output and input.
Ive read up a bit and what i realized is that a input in %pre phase is not a problem.
Example: echo "ip adress" > /etc/hosts
BUT
I want a little handy script that actually asks with an output what kind of ip adress he/she/that/whatever want to, even tho it want be totally self installing.

Something more or less like this:
echo "ip adress?"
read adress
echo $adress > /etc/hosts

//
Your Maskot

You dont have to know the answer, more or less i want to know if it is possible.
But if you got any tip on HOW TO i wouldnt cry either :slight_smile:

first of all i am aware of that /etc/hosts dont contain the actually ip adress but hostname, its an example.

Another way to solve this problem is to set variables i guess...

#!/bin/sh
touch /etc/profile.d/file

echo "hostname?"
read hostname
echo "http proxy?"
read proxy
echo "ip address?"
read address

echo "HOSTNAME=$hostname" > /etc/profile.d/file
echo "http_proxy=$proxy" > /etc/profile.d/file
echo "IPADDR=$address" > /etc/profile.d/file

But the problem is still, how do i get an output that actually work, my guess is to send it to another tty?

Doesnt seems like many of you very intressdid in this thread.
Anyway i come up with an solution of it happends to have the same problem.

Under %post in your kickstart server config:
#!/bin/sh
chvt 3
exec < /dev/tty3 > /dev/tty3

echo "hostname?"
read hostname
echo "http proxy?"
read proxy
echo "ip address?"
read address

echo "IPADDR=$address" > /etc/sysconfig/network-scripts/ifcfg-eth0
echo "$hostname" > /etc/hosts
echo "http_proxy=$proxy" > /etc/profile.d/file
chvt 1
exec < /dev/tty1 > /dev/tty1