[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pcmcia-cs trouble



On Jul 15, Russell Coker (russell@coker.com.au) wrote:
 > On Tue, 15 Jul 2003 02:00, Derek Broughton wrote:
 > > > However my PCMCIA functionality is currently less than yours, when a card
 > > > is inserted the driver is loaded but no scripts are run.
 > >
 > > iirc, you didn't have a PCMCIA card, it was a Cardbus card.  In which case,
 > > it should skip the pcmcia scripts and use HotPlug...
 > 
 > Thanks for this advice.  It seems that hotplug was running
 > "ifup eth0=hotplug", I modified it so that it would run "ifup eth0" and now it 
 > works fine.  I'm not sure if this is a bug in hotplug or in my settings for 
 > /etc/network/interfaces.

It is your settings in /etc/network/interfaces.  I have the following:

------------------------------------------------------------------------------
mapping hotplug
	script /usr/local/bin/map-scheme

iface default inet static
	address nnn.nnn.nnn.nnn
	netmask nnn.nnn.nnn.nnn
	gateway nnn.nnn.nnn.nnn
	up /usr/local/bin/ifupdown.sh up default
	down /usr/local/bin/ifupdown.sh down default

iface bs9 inet static
	address nnn.nnn.nnn.nnn
	netmask nnn.nnn.nnn.nnn
	gateway nnn.nnn.nnn.nnn
	up /usr/local/bin/ifupdown.sh up bs9
	down /usr/local/bin/ifupdown.sh down bs9

iface dhcp inet dhcp
	up /usr/local/bin/ifupdown.sh up dhcp
	down /usr/local/bin/ifupdown.sh down dhcp
------------------------------------------------------------------------------

and the default hotplug command (ifup eth0=hotplug) works.  I had to figure
out by trial and error that the argument to the mapping command was 'hotplug'
and not 'etho' or 'eth0=hotplug' or whatever.  I didn't see any documentation
on this.

I could have used one of the various packages that figures out on the fly
which network I am on and picks the appropriate interface, but I prefer to
just manually run a command that tells the machine what network to use.  The
mapping script, map-scheme, just echoes the saved value, i.e., one of
'default', 'bs9', or 'dhcp'.  Hotplug executes 'ifup eth0=hotplug', and ifup
calls map-scheme, then finds the logical interface with that name in
/etc/network/interfaces and uses that the set up the network.  I can provide
the map-scheme script (and the script it calls) to anyone interested.

ifupdown.sh is just a script that mucks about with resolv.conf and does some
other things that I want done when an interface goes up or down.

I removed the pcmcia-cs package yesterday, and it all still works.  I don't
get the beeps when I plug in or remove the card, but I can live with that :-)

FYI, I am using kernel 2.4.20 with a 3Com 3CCFE575CT (a CardBus card).

-- 
Neil Roeth



Reply to: