Problem with using wireless schemes


From: Shadle Park (spreunion_at_hotmail.com)
Date: 2002-06-28 15:31:59 UTC


I'm trying to use schemes to configure my wireless card(s), and it looks like I found a bug. I have configured some wireless schemes in
/etc/pcmcia/wireless.opts, and am attempting to select a scheme using the
cardctl utility, but it doesn't work. Here is what I know:

I am using pcmcia-cs-3.1.34 (I have checked earlier versions also).

The basic flow used by cardctl when setting a scheme is:

get the pcmcia device information from the stab for each device, call /etc/pcmcia/network cksum <dev> <scheme> If the return value is 1, then do
/etc/pcmcia/network stop <dev>
/etc/pcmcia/network start <dev>

However, the cksum path does not detect that the scheme will change the environment, so it returns a 0 and cardctl does not issue the commands needed to apply the scheme.

Here is the basic path for the cksum script function and the probable bug:

/etc/pcmcia/network cksum <dev> <scheme>
Set up environment based on the current scheme . /etc/pcmcia/wireless

+(in wireless)
+set up wireless environment based on current scheme
+call chk_simple in /etc/pcmcia/shared
++(in chk_simple in shared)
++(checks to see if applying the scheme will change the environment)
++do a hash of the current environment (result of set)
++using the new scheme, source the . $0.opts (BUG?!)
++do a hash of this new environment
++Compare the two hashes to see if the environment changed
+If the environment changed, then indicate that this is a wireless change
If not a wireless change, run the chk_simple again.

This script looks like it is supposed to check if the wireless environment would change when this scheme is applied, and if not then checks if the network environment would change with the application of the scheme. The problem is that it DOES NOT CHECK the wireless environment for change. In chk_simple, it sources $0.opts, which is always /etc/pcmcia/network.opts. Since my scheme does not apply to network.opts, chk_simple reports no change, the network script returns a 0 to cardctl, and cardctl thinks it's job is done.

Is anyone using wireless schemes? Did they have to add some info about their scheme into network.opts to get the thing to work?



Join the world�s largest e-mail service with MSN Hotmail. http://www.hotmail.com

This archive was generated by hypermail 2.1.4.