![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ksh: cmd output to input of another script | IMTheNachoMan | Shell Programming and Scripting | 2 | 04-27-2008 10:58 AM |
| Using output to input another command | rodrimuino | Shell Programming and Scripting | 3 | 02-14-2008 12:37 PM |
| Using Output from one command as input to another | BkontheShell718 | Shell Programming and Scripting | 2 | 12-26-2007 04:23 PM |
| v3fshelper: There is an input or output error | padawan75 | AIX | 2 | 11-21-2007 08:56 AM |
| log script input and output using tee ? | moseschrist | Shell Programming and Scripting | 0 | 11-12-2006 03:32 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 |
|
||||
|
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? |
|
||||
|
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|