Test for configured ethX
- From: CptDondo <yan@xxxxxxxxxxxxxxxx>
- Date: Wed, 28 Mar 2007 09:44:28 -0800
I have a machine that travels. I want to configure it differently when it is attached to a local network and when it is not.
So...
Is there an easy way to test if ethX (eth1 in my case) has received an IP address via DHCP?
What I want is something like this:
Try to get a DHCP address
If you succeed, do the following
copy network database config file to our config
If you fail, do the following
copy local database config file to our config
start local mysqld
Nothing too complex.... But I can't seem to find a reliable test for the DHCP assignment.
The box is running Debian Etch, if that matters....
--Yan
.
- Follow-Ups:
- Re: Test for configured ethX
- From: Stephane CHAZELAS
- Re: Test for configured ethX
- Prev by Date: skbuf problem
- Next by Date: Any VPN client for RH linux to connect to office VPN server (Sonicwall)
- Previous by thread: skbuf problem
- Next by thread: Re: Test for configured ethX
- Index(es):
Relevant Pages
|