REMOVE_CMD went missing during remove action events

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

 



I've started to use REMOVE_CMD in my udev scripts, but during my testing
I've noticed that the REMOVE_CMD doesn't get called.

Here is my udev rule which matches on a USB Bluetooth device, calls the
start function, and queues up the stop function via the REMOVE_CMD
environment variable.

ACTION=="add", KERNEL=="hci[0-9]*", SUBSYSTEM=="bluetooth",
ENV{REMOVE_CMD}="/etc/init.d/bluetooth stop",
RUN+="/etc/init.d/bluetooth start"

When the device is removed, the REMOVE_CMD environment variable is
missing. Is this expected behaviour?


# insert Bluetooth device, REMOVE_CMD is defined
UDEV  [883618587.004419] add     
/devices/platform/at91_ohci/usb1/1-1/1-1:1.0/hci0 (bluetooth)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/platform/at91_ohci/usb1/1-1/1-1:1.0/hci0
SUBSYSTEM=bluetooth
SEQNUM=575
UDEVD_EVENT=1
REMOVE_CMD=/etc/init.d/bluetooth stop

# remove Bluetooth device, REMOVE_CMD is missing
UDEV  [883618588.926582] remove  
/devices/platform/at91_ohci/usb1/1-1/1-1:1.0/hci0 (bluetooth)
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/platform/at91_ohci/usb1/1-1/1-1:1.0/hci0
SUBSYSTEM=bluetooth
SEQNUM=586
UDEVD_EVENT=1


Aras

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux