One Device, Several Profiles

David G. Miller (aka DaveAtFraud) dave at davenjudy.org
Fri Jul 8 05:16:38 UTC 2005


Daniel Normolle <monk at umich.edu> wrote:

>Hi,
>
>I have my PCMCIA wifi card running under FC3 on my laptop.  When
>plugged in, it always comes up using the same profile, which is
>associated with the device ath0.  This profile has my home
>settings, specifically my SSID and encryption key.
>
>I would like to be able to define an alternative wireless profile
>for ath0 without a specified SSID and key (for easy use in public
>places), and in fact I have done so, but if I plug in the PCMCIA
>card, it always configures according to the original default profile
>with the encryption key.  Deactivating one profile and activating
>another does not seem to work.  I can provide gory details if
>required.
>
>How, actually what, do I configure so that I can insert the
>PCMCIA card and then associate ath0 on the fly with whichever
>profile I choose?
>
>Thanks in Advance!
>
>dpn

I'm an old Unix script hacker so there may be a more elegant solution than this.  I faced a similar problem but for my wired NIC since I use my laptop both at home and at work.  My solution was to make a copy of /etc/sysconfig/ifcfg-eth0 as ifcfg-eth1 with ONBOOT set to no and the appropriate changes for my work configuration.  I then created a shell script called work.sh that does an ifdown on eth0, an ifup on eth1 and a few other minor things (e.g., set the route to use my work gateway) that I didn't get for free by just bringing up the interface.  Note that both ifcfg-eth0 and ifcfg-eth1 both point to eth0 as the actual ethernet device.  

At some point I will create something similar for my wireless connection so that I can connect to a public access point if the need arises.  I don't know of any reason why something like this shouldn't work for you.

Dave






More information about the fedora-list mailing list