Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 17th, 2007, 10:01 PM   #1
Thaidog
Newbie
 
Join Date: Sep 2004
Posts: 8
Rep Power: 0 Thaidog is on a distinguished road
Question 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?
Thaidog is offline   Reply With Quote
Old Aug 24th, 2007, 10:03 PM   #2
hush
Programmer
 
hush's Avatar
 
Join Date: Feb 2006
Location: 127.0.0.1
Posts: 35
Rep Power: 0 hush is on a distinguished road
Why not use the "setup" command? It does what you are describing.
hush is offline   Reply With Quote
Old Aug 24th, 2007, 11:05 PM   #3
Thaidog
Newbie
 
Join Date: Sep 2004
Posts: 8
Rep Power: 0 Thaidog is on a distinguished road
Quote:
Originally Posted by hush View Post
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".
Thaidog is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware installation guide for Linux beginners coldDeath Coder's Corner Lounge 104 Jul 29th, 2007 4:40 AM
My views on Linux Marvin Coder's Corner Lounge 70 Dec 19th, 2006 11:13 AM
AutoIt, Apple Script, what about Linux? Nebula Coder's Corner Lounge 5 Mar 20th, 2006 7:07 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:50 AM.

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