Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ 1 [2] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: if dhcp else static ip?, How can I set ip depending on dhcp?< Next Oldest | Next Newest >
chaostic Offline





Group: Members
Posts: 328
Joined: Mar. 2005
Posted: Sep. 27 2006,00:21 QUOTE

Hmm. Well, eth0 is recognized after I use the netcard config script to setup an ip if I boot and no dhcp address is assigned at start. I don't think it is a problem if the card isn't initialized unless it finds an ip.

Maybe its because I'm using a pcmia ethernet card?
Back to top
Profile PM 
dtf Offline





Group: Members
Posts: 196
Joined: Nov. 2005
Posted: Sep. 27 2006,00:44 QUOTE

Quote

Maybe its because I'm using a pcmia ethernet card?


Yes. Maybe that is it.  I am not familar with that configuration.  I was testing using an internal ethernet card.

There are many way you could write the script but I think the ifconfig command is what would drive your check.  Like or something close to this

ETH0=

ETH0=`ifconfig | grep eth0`
if [  -z ${ETH0}  ]; then
   setup static ip.

etc.
Back to top
Profile PM 
6 replies since Sep. 25 2006,06:32 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ 1 [2] >/
reply to topic new topic new poll
Quick Reply: if dhcp else static ip?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code