* On Feb 17 16:16, Neil Bothwick ([email protected]) wrote:
> net.eth0 isn't actually failing when ifplugd detects no cable. It is
> shown as inactive rather than stopped. You could try starting the
> interface from /etc/conf.d/local only if eth0 is not active with
>
> etc/init.d/net.eth0 status --quiet | echo /etc/init.d/eth1 start
I meant to say inactive rather than failed, you're correct. You're also
right that I could start my wireless from local.start, but this wouldn't
*quite* solve the problem.
The issue is that even though ifplug recognizes that eth0 is inactive,
baselayout isn't starting eth1 instead; it just seems to skip eth1 (even
though it's on the same runlevel), and any net-dependent rc scripts after
that say they'll start when net.eth0 starts. I'd like them to start when
*any* net.eth* starts.
The funny thing is, if net.eth0 succeeds in starting, then it *will*
start eth1 immediately after. Just the opposite of the expected - it
only starts the alternate interface when you don't need it!
> You should also edit /etc/conf.d/net to shut down eth1 when eth0
> detects a cable. I have this as the preup function
>
> preup() {
> [ ${IFACE} == "eth0" ] && /etc/init.d/net.eth1 --quiet status &&
> /etc/init.d/net.eth1 pause
> return 0
> }
Thanks for this - it looks quite handy. Is preup() executed after ifplug
notices a connection? When does postup() occur, if that's the case?
I'm having another funny problem today that I can't work out - DHCP
stopped working for wireless. I odn't think I've changed anything. DHCP
works fine on the wired connection, and wireless works fine if I set an
explicit IP, but not with DHCP. Perhaps something related to the newest
baselayout?
Thanks,
Tom
--
[email protected] mailing list