From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aras Vaichas Date: Fri, 29 Aug 2008 03:18:09 +0000 Subject: REMOVE_CMD went missing during remove action events Message-Id: <48B76A71.4040501@magtech.com.au> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org 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=3D"add", KERNEL=3D"hci[0-9]*", SUBSYSTEM=3D"bluetooth", ENV{REMOVE_CMD}=3D"/etc/init.d/bluetooth stop", RUN+=3D"/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 =20 /devices/platform/at91_ohci/usb1/1-1/1-1:1.0/hci0 (bluetooth) UDEV_LOG=3D3 ACTION=ADd DEVPATH=3D/devices/platform/at91_ohci/usb1/1-1/1-1:1.0/hci0 SUBSYSTEM=3Dbluetooth SEQNUMW5 UDEVD_EVENT=3D1 REMOVE_CMD=3D/etc/init.d/bluetooth stop # remove Bluetooth device, REMOVE_CMD is missing UDEV [883618588.926582] remove =20 /devices/platform/at91_ohci/usb1/1-1/1-1:1.0/hci0 (bluetooth) UDEV_LOG=3D3 ACTION=3Dremove DEVPATH=3D/devices/platform/at91_ohci/usb1/1-1/1-1:1.0/hci0 SUBSYSTEM=3Dbluetooth SEQNUMX6 UDEVD_EVENT=3D1 Aras ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 ______________________________________________________________________