Something planed in the future to have a feature like:
config_eth0=("dhcp" || "adsl")
in the network configuration ?
At work I would get an ip adress from a DHCP server while at home I would be
connected to my ISP.
Steps to Reproduce:
i think that's kind of vague & ugly ...
cant this be done through custom runlevels ?
I think you mean having one runlevel using net.eth0 and another using net.ppp0.
Unfortunatly I have also specified a static ip adress in net.eth0 for the alias
eth0:1 which than would not be created - or this ip adress has to be specified
twice in two different files.
But you're right this enhancement wish is only a 'nice to have'.
Oh, here is an answer: http://forums.gentoo.org/viewtopic.php?p=2528591#2528591
config_eth0=( "dhcp" )
fallback_eth0=( "adsl" )
That works fine
no, what i meant was to be able to say to the net scripts 'use this config when
i am in XXX runlevel but use this other config when i am in YYY runlevel' ...
Ah, in fact that could be a nice feature to keep the network configuration
together in only one single file.
as discovered on irc, we already have this support in baselayout, and for all
config scripts, not just net
/etc/conf.d/<service>.<runlevel> will be used if it exists, otherwise the
default /etc/conf.d/<service> will be used
so if you create a custom runlevel called 'home' and create
/etc/conf.d/net.home, you can put your adsl settings there