Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48305 - Backup/alternate static ip configuration for dhcp failure (ala Windows XP)
Summary: Backup/alternate static ip configuration for dhcp failure (ala Windows XP)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: InVCS
: 50179 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-19 03:38 UTC by Kent Hulick
Modified: 2004-11-03 19:14 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
net.eth0 patch file (altIfconfig.patch,3.34 KB, patch)
2004-04-19 03:41 UTC, Kent Hulick
Details | Diff
actual patch applied to rc-scripts cvs (net.eth0-fallback.patch,4.48 KB, patch)
2004-05-06 19:23 UTC, Aron Griffis (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Hulick 2004-04-19 03:38:00 UTC
Switching between networks that use dhcp and ones which require static ip configuration is a pain with the existing net.eth scripts.  This was actually one of the really few things Windows XP has done very well--it allows an alternate (fixed) ip configuration to be specified in the event that dhcp fails.

I have modified the net.eth0 script from baselayout v. 1.8.11 to include the ability to specify an alternate configuration in /etc/conf.d/net and have it applied to the eth device if dhcp fails.  The patch is attached.

Reproducible: Always
Steps to Reproduce:
1.Switch between dhcp-capable and dhcpless networks
2./etc/init.d/net configuration will work for one or the other, but not both

Actual Results:  
Works for either dhcp network or fixed network, but not both.

Expected Results:  
After apply the attached patch, it will work nicely in either network.
Comment 1 Kent Hulick 2004-04-19 03:41:42 UTC
Created attachment 29601 [details, diff]
net.eth0 patch file

Adding the patch, posted in Documentation Tips & Tricks forum:
http://forums.gentoo.org/viewtopic.php?t=163212
Comment 2 Daniel Black (RETIRED) gentoo-dev 2004-05-06 03:25:40 UTC

*** This bug has been marked as a duplicate of 50179 ***
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2004-05-06 07:36:01 UTC
*** Bug 50179 has been marked as a duplicate of this bug. ***
Comment 4 Aron Griffis (RETIRED) gentoo-dev 2004-05-06 07:36:26 UTC
Reverse duplicates and re-open this bug
Comment 5 Aron Griffis (RETIRED) gentoo-dev 2004-05-06 19:22:07 UTC
Thanks for the idea and patch.  I modified the patch some, but the basic idea is still the same.  I changed the variable from ifconfig_alt_ethX to ifconfig_fallback_ethX to disambiguate this from any other use of the word "alt" or "alternate"

I will attach my patch for your review and put this in rc-scripts cvs.  It will appear in the next version of baselayout
Comment 6 Aron Griffis (RETIRED) gentoo-dev 2004-05-06 19:23:13 UTC
Created attachment 30890 [details, diff]
actual patch applied to rc-scripts cvs
Comment 7 Christoph Brill (egore) (RESIGNED) 2004-05-10 09:00:06 UTC
i'm not sure if this is related, but since the new baselayout is out, i no longer can use dhcp. it always uses ifconfig_fallback_eth0
Comment 8 David Bruha 2004-06-20 10:29:14 UTC
Cool - just one additional wish: Could you add some comments (perhaps with example) into the /etc/conf.d/net file? It would have spared me a lot of time because I would have known this feature existed. I have found it while studying the /etc/init.d/net.eth0 script ...
Comment 9 SpanKY gentoo-dev 2004-11-03 19:14:03 UTC
1.11.x supports ifconfig_fallback_ so that if dhcp fails, it'll use that