Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Bash / Shell Scripting (http://www.programmingforums.org/forum26.html)
-   -   Need a script to add in IP's for Red Hat Linux (http://www.programmingforums.org/showthread.php?t=13797)

Thaidog Aug 17th, 2007 10:01 PM

Need a script to add in IP's for Red Hat Linux
 
I'm looking for code that I can put in a shell script that will allow me to input IP addresses and network info (Such as subnet mask...etc) to the ifcfg-eth0 script(s) located in /etc/sysconfig/network-scripts.

Basically something that will ask you what IP address you want to enter... you enter the IP address and the ifcfg-eth0 file gets modified.

Anybody know how to code this correctly?

hush Aug 24th, 2007 10:03 PM

Why not use the "setup" command? It does what you are describing.

Thaidog Aug 24th, 2007 11:05 PM

Quote:

Originally Posted by hush (Post 132810)
Why not use the "setup" command? It does what you are describing.

The reason I can not use the setup command is that the terminal interface that I'm using to access these Linux blades is java and does not entirely behave like a vt100 standard interface... in other words the setup command renders a garbled mess of hard to interpret menus that you can't tab through easily. Plus, I've already got a script going for other things on the system and I just wanted to add this in to it's "mix".


All times are GMT -5. The time now is 9:18 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC