On Fri, 2002-12-27 at 07:14, Jeff Bearer wrote:
> I have a laptop, a wired network card that takes up both pcmcia slots
> and a wireless network card.  I'm trying to figure out how to set these
> up as seamlessly as possible.  I can't have them both installed at the
> same time because they won't fit, and when I take one out and put in the
> other, linux has an idenity crisis.
> 
> I'm setting this up using the RH8 network control panel which may be
> part of my problem.  I'm trying to use this because I want to set up
> different network profiles.
> 
> The problem is that it always thinks that the card that is installed is
> supposed to be eth0. but the two cards use different kernel modules and
> the entry in /etc/modules.conf says that eth0 uses the module for
> whatever card I have installed last.
> 
> Can I modify the configuration so it will know to load the proper kernel
> module and not have one hard coded into modules.conf?  Or can I
> configure pcmcia so that when the wired net card is removed and the
> wireless card is installed to make it eth1?
> 
This may not be the *right* way to do it, but it might work.
In /etc/pcmcia/network
There is a case statement with "start" and "stop" clauses.
This script gets called by the cardctl process when it detects a change
in pcmcia network devices.

You could add "rmmod  MODNAME" there to the "stop" clause
for both of the modules you use.
Then when you unplug a NIC your Module will be unloaded?? (maybe?)

Test it and see.

Also, I have had problems with my laptop when doing things like that
when in X-windows.  Because of DISPLAY ID issues.
But you may not have such issues.

I don't switch my network config very much unless I am shutting down
the box and taking it home.  So I have disabled the System V init
scripts for almost everything that has to do with the Docked vs.
Undocked  hardware config and the home vs. office network config.

Then in my rc.local script I use mii-tool to figure out which NIC
I am using, the onboard, the PCMCIA aironet card, or the docking station
NIC, and then I have rc.local copy the correct XF86config, the right
modules.conf for the sound config, and the /etc/sysconfig/mouse file
and the right /etc/resolv.conf file into place, do a network reload,
and then start up the network daemons like sshd ntpd and xfs.

I guess if I wanted to not reboot, but change around the NIC's
*I* would log out of X, then init 1, do an rmmod -a a few times, 
then change the network cards and init 3, then log back in and
start X.  The way I have my laptop set up it handles the
reconfigurations for different hardware/net environments very well.

-Ben.



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to