kickstart output/input

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat kickstart output/input
# 1  
Old 05-31-2007
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
# 2  
Old 05-31-2007
answer

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 Smilie
# 3  
Old 05-31-2007
follow up

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?
# 4  
Old 05-31-2007
answer

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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Unable to open input kickstart file curl#37

Hi, Getting the below error while installing from ks.cfg unable to open input kickstart file curl#37 Couldn't open file /tmp/swappart Here am trying to include /tmp/swappart file from pre section under disks and partition section. Dont know where exactly am doing wrong My kickstart file... (3 Replies)
Discussion started by: Sumanthsv
3 Replies

2. Red Hat

Input/output error

Hi issue with red hat and san. I had a LUN shared to me from an oracle storage I am able to see it and the size. ~]# multipath -ll mpathe (3600144f0e984617b00005b466bd70014) dm-3 SUN,ZFS Storage 7430 size=10T features='0' hwhandler='0' wp=rw |-+- policy='round-robin 0' prio=1... (0 Replies)
Discussion started by: goya
0 Replies

3. UNIX for Dummies Questions & Answers

Filtering output from given input

Hi All, I have a input file as below. Input file may contain more hostlists. sample Input file $ cat hostlist.lst cs18-db1-1-sjl cs22-db1-1-was na88-db1-1-chi na21-db1-2-was I want the output like below format. Pls help. Thanks ! Output format: ... (4 Replies)
Discussion started by: kamauv234
4 Replies

4. Shell Programming and Scripting

Take the input from output logs

Hi, If I have loads of logs like below and I am interested to print the requests(lines) which have taken more than 1000 ms. In this case how could I print the two highlighted lines ? abc.log reqquest id232342 , adfghfasdfsaf, TIME=30 reqquest id11111 , asdfdfghdffsaf, TIME=54 reqquest... (4 Replies)
Discussion started by: nariwithu
4 Replies

5. Shell Programming and Scripting

Take the input from output logs

Hi, If I have loads of logs like below and I am interested to print the requests(lines) which have taken more than 1000 ms. In this case how could I print the two highlighted lines ? abc.log reqquest id232342 , adfghfasdfsaf, TIME=30 reqquest id11111 , asdfdfghdffsaf, TIME=54 reqquest... (0 Replies)
Discussion started by: nariwithu
0 Replies

6. Shell Programming and Scripting

INPUT/OUTPUT question

Hi All, Is it wrong to do something like this: ssh -T $PROXY_USER@$PROXY_SERVER < script.txt > ssh_output.log I ran and it works fine and does what I need. I wanted to pass a set of commands to the ssh session and store an output in the log file. Thanks (4 Replies)
Discussion started by: rdogadin
4 Replies

7. Shell Programming and Scripting

Dynamic output file generation using a input text file with predefined output format

Hi, I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format. Example: File.txt AP|{SSHA}VEEg42CNCghUnGhCVg== APVG3|{SSHA}XK|"password" AP3|{SSHA}XK|"This is test" .... etc --------- test.sh has... (1 Reply)
Discussion started by: hudson03051nh
1 Replies

8. Shell Programming and Scripting

input -output file

Hi, I am having an Input file .which is having a list of names. comapring with our database , needs to write the out put in file called output.txt , format should be name--> country--->phone number could you please help me.. thanks in advance (7 Replies)
Discussion started by: hegdeshashi
7 Replies

9. UNIX for Advanced & Expert Users

input/Output settings

How can we view all the input/output settings of unix environment for a session (6 Replies)
Discussion started by: paritoshc
6 Replies

10. Shell Programming and Scripting

Using Output from one command as input to another

This site has been very helpful thus far.. I thank you all in advance for sharing the knowledge. Let me get to it. I am trying to write a very small script to take away from the boredom of doing the same thing over and over. Everynow and again I have to get the hex value of a file using a... (2 Replies)
Discussion started by: BkontheShell718
2 Replies
Login or Register to Ask a Question