LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-02-2003, 10:02 PM   #1
jhachey
LQ Newbie
 
Registered: Aug 2003
Posts: 17

Rep: Reputation: 0
Script to automatically config eth0 at startup


Hello,

Just today I managed to install GentooX (aGentoo port) onto my XBOX ! But I am having trouble configuring the netwoirk adapter to connect to the internet. First off, I don't know how to set it for dynamic IP addressing. Second, I would like to know if someone could tell me how to write some kinda script or batch file to automatically set eth0 to DHCP everytime I boot up. With other programs on my XBOX, they set a static IP. Therefore, pretty much everytime I boot up Linux I have a static IP.

Any help would be great. It feels good being able to surf the net from my couch
 
Old 11-03-2003, 01:37 AM   #2
mass_nerder
LQ Newbie
 
Registered: Jun 2003
Location: PC, FL (swampy)
Distribution: gentoo, FreeBSD
Posts: 19

Rep: Reputation: 0
Re: Script to automatically config eth0 at startup

Quote:
Originally posted by jhachey
Hello,

Just today I managed to install GentooX (aGentoo port) onto my XBOX ! But I am having trouble configuring the netwoirk adapter to connect to the internet. First off, I don't know how to set it for dynamic IP addressing. Second, I would like to know if someone could tell me how to write some kinda script or batch file to automatically set eth0 to DHCP everytime I boot up. With other programs on my XBOX, they set a static IP. Therefore, pretty much everytime I boot up Linux I have a static IP.

Any help would be great. It feels good being able to surf the net from my couch
wow .... Gentoo on XBox

try editing /etc/conf.d/net to youre' pref's ..... and
$rc-update add net.eth0 default ----- that "might do it ....

if your IP keeps changing ... why/4/cause? .... next place to go is /etc/resolv.conf

of course ---i'm unsure how gentoo would be configured on Xbox ... so ... "this is where i'd start for a PC though"
 
Old 11-03-2003, 02:06 AM   #3
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Try just typing dhclient eth0 from the console/xterm. If that works then add it to a startup script. The actual scripts are located int /etc/init.d and they are linked to various places in /etc/rc.X where X is a number. The scripts in /etc/rc.X are executed in alphnumeric order so make yours go last.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
eth0 won't come up automatically cheekyal Mandriva 7 11-28-2004 05:46 AM
why not automatically up eth0 on boot LinuxRam Linux - Networking 2 11-02-2004 06:53 AM
automatically turn off eth0 when wireless eth1 is in megaspaz Linux - Laptop and Netbook 0 01-08-2004 03:49 AM
Problems loading eth0 automatically. ESXuser Linux - Newbie 5 10-15-2003 12:03 PM
How can the linux OS run script automatically at startup? tommylkc Linux - Newbie 1 06-26-2002 03:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration