Relationship between /etc/network, /etc/pcmcia, and /etc/apm

2002-03-07 Thread Joe Emenaker

I'm having trouble sorting this out.

I've got a laptop running Debian. Depending on whether I'm home or at
work, I'll have either a wireless network card (Lucent Orinocco) or a
wired network card (Xircom RealPort) in the unit. For convenience, I
hardly ever shut the machine down... I just have it suspend-to-disk and
then resume later.. after having inserted the appropriate network card
for the location.

My problem comes from the fact that the networking stuff doesn't always
come back to life when I resume. Specifically, the Xircom card seems to
be problematic. For some reason, dhcp doesn't work on the Xircom unless
it is first put into promiscuous mode. So... somewhere (I don't remember
where), I have a ifconfig eth0 up promisc line. This seems to work
fine when I'm booting from scratch, but not when I'm resuming from a
suspend. My guess is that the sequence of things that happen during a
resume doesn't involve the piece I have that invokes promiscuous mode.

So, anyway... I was trying to get a handle on how all of the
/etc/network, /etc/pcmcia and /etc/apm pieces fit together.

Some specific questions I have are:

1 - I've noticed that /etc/pcmcia has a network script (with
network.opts) and a wireless script (with wireless.opts). What
determines which of these gets invoked? Do they do complementary tasks
(in other words, do wireless cards need network AND wireless to be
run)?

2 - If I recall correctly, when I insert a pcmcia card (or when I resume
from suspend), cardmgr invokes a cardctl insert or something like
that. What chain of events/scripts is triggered by this?

3 - On a non-laptop that's going to use dhcp, I would configure for dhcp
in /etc/network/interfaces, no? However, on my laptop, I've noticed that
/etc/pcmcia has a lot of files that mention dhcp. What's the advantage
of configuring dhcp there? Also, what happens in the event of a
conflict, where /etc/network/interfaces and /etc/pcmcia/*.opts call for
different IP's or if one calls for dhcp and the other specifies an IP?

- Joe




Re: Relationship between /etc/network, /etc/pcmcia, and /etc/apm

2002-03-07 Thread Sean 'Shaleh' Perry
 Some specific questions I have are:
 
 1 - I've noticed that /etc/pcmcia has a network script (with
 network.opts) and a wireless script (with wireless.opts). What
 determines which of these gets invoked? Do they do complementary tasks
 (in other words, do wireless cards need network AND wireless to be
 run)?
 

if you look at the script network is run first, then wireless (if the card is a
wireless one)

 2 - If I recall correctly, when I insert a pcmcia card (or when I resume
 from suspend), cardmgr invokes a cardctl insert or something like
 that. What chain of events/scripts is triggered by this?
 

the hardware issues an event that the pcmcia drivers catch.  They notify
cardctl.  cardctl looks up the card type inserted via /etc/pcmcia/config and
inserts the proper module then runs the proper /etc/pcmcia script.

 3 - On a non-laptop that's going to use dhcp, I would configure for dhcp
 in /etc/network/interfaces, no? However, on my laptop, I've noticed that
 /etc/pcmcia has a lot of files that mention dhcp. What's the advantage
 of configuring dhcp there? Also, what happens in the event of a
 conflict, where /etc/network/interfaces and /etc/pcmcia/*.opts call for
 different IP's or if one calls for dhcp and the other specifies an IP?
 

This used to be fairly confusing.  pcmcia had its config and the system had
another.  Recent pcmcia-cs packages have merged the functionality.  You should
be able to configure everything via /etc/network/interfaces now.  Look at the
end of /etc/pcmcia/network.opts.  If it makes a call to ifup in start_fn() then
you have this currently.

The /etc/network/interfaces file is only used by the commands ifup and ifdown. 
These are called during init.  However for pcmcia network cards there is no
auto line so nothing happens.  All control is in the pcmcia scripts.

P.S. are you aware of debian-laptop?  It is debian-user for laptop specific
questions.