devd problem?

Johnny Choque jchoque at tlmat.unican.es
Wed Aug 2 08:48:24 UTC 2006


Hi all,

I has been testing the execution of some commands after inserting and
removing a wireless pc card, using the rules of devd.conf and I've noticed
quite a strange behavior with devd.

I have used it in debug mode, thus running 'devd -dD', in order to see the
rules that will be happening. Specifically, the rules in devd.conf that I
want to monitor are the following ones:

detach 0 {
	media-type "802.11";
	action "/etc/pccard_ether $device-name stop"; };

attach 0 {
	media-type "802.11";
	action "/etc/pccard_ether $device-name start"; };


After the Wireless pc card is inserted, the 'devd -dD' command shows the
following
messages:

Processing event '+wi0 manufacturer=0x0156 product=0x0002 cisvendor="Lucent
Technologies" cisproduct="WaveLAN/IEEE" function_type=6 at function=0
manufacturer=0x0156 product=0x0002 cisvendor="Lucent Technologies"
cisproduct="WaveLAN/IEEE" function_type=6 on pccard0'
Pushing table
setting device-name=wi0
setting manufacturer=0x0156
setting product=0x0002
setting cisvendor=Lucent Technologies
setting cisproduct=WaveLAN/IEEE
setting function_type=6
Processing attach event
Testing device-name=wi0 against ^ed50
Testing device-name=wi0 against ^ubt[0-9]+ Testing device-name=wi0 against
^ukbd0 Testing device-name=wi0 against ^ums[0-9]+ Testing media type of wi0
against 0x20 wi0 has media type 0x80 Testing media type of wi0 against 0x80
wi0 has media type 0x80 Executing '/etc/pccard_ether wi0 start'
Popping table

As you can see, the command pccard_ether, which is included in the attach
section is successfully run but, after removing the wireless pc card, the
rules that are included in the detach section do not happen to run, as
showed in the following
messages:

Processing event '-wi0 manufacturer=0x0156 product=0x0002 cisvendor="Lucent
Technologies" cisproduct="WaveLAN/IEEE" function_type=6 at function=0
manufacturer=0x0156 product=0x0002 cisvendor="Lucent Technologies"
cisproduct="WaveLAN/IEEE" function_type=6 on pccard0'
Pushing table
setting device-name=wi0
setting manufacturer=0x0156
setting product=0x0002
setting cisvendor=Lucent Technologies
setting cisproduct=WaveLAN/IEEE
setting function_type=6
Processing detach event
Testing device-name=wi0 against ^ed50
Testing device-name=wi0 against ^ubt[0-9]+ Testing device-name=wi0 against
^ukbd0 Testing media type of wi0 against 0x20 Testing media type of wi0
against 0x80 Popping table

I was expecting a similar behaviour of devd as the one I saw when I inserted
the pc card, but the message:

Executing '/etc/pccard_ether wi0 stop'

doesn't appear and for this reason I think that the rule of the detach
section does not run.
Does anybody know which may be the problem? What I need to do is executing a
particular application upon the removal of the pc card, do you know how can
I do that?

Cheers,

Johnny



More information about the freebsd-questions mailing list