linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aras Vaichas <arasv@magtech.com.au>
To: linux-hotplug@vger.kernel.org
Subject: REMOVE_CMD went missing during remove action events
Date: Fri, 29 Aug 2008 03:18:09 +0000	[thread overview]
Message-ID: <48B76A71.4040501@magtech.com.au> (raw)

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­d
DEVPATH=/devices/platform/at91_ohci/usb1/1-1/1-1:1.0/hci0
SUBSYSTEM=bluetooth
SEQNUMW5
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
SEQNUMX6
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 
______________________________________________________________________

                 reply	other threads:[~2008-08-29  3:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48B76A71.4040501@magtech.com.au \
    --to=arasv@magtech.com.au \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).