On Sat, Oct 29, 2005 at 01:36:53PM +0200, Marco d'Itri wrote:

> It's supposed to work. At least, it does for me.
> BTW, you should add a BUS statement and definitely ACTION=="add".

I changed the rule to:

BUS=="usb", SYSFS{idVendor}=="04e6", SYSFS{idProduct}=="e003", ACTION=="add", 
RUN+="/etc/hotplug/usb/gnupg-ccid"

but it still only works on hotplug, not at startup.  Might this be a bug
in the script triggered by the different conditions at startup?  The
active portion of the script is:

  if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
  then
      chmod o-rwx "${DEVICE}"
      chgrp "${GROUP}" "${DEVICE}"
      chmod g+rw "${DEVICE}"
  fi

(note the test for $ACTION - this is why I didn't bother specifying it
in the udev rule.)  In particular, could the script be run prior to the
device node being created?  Also, I'm expecting that the device passed
in will be in /proc/bus/usb/ (it appears to be during normal operation).
Might that create trouble?

-- 
"You grabbed my hand and we fell into it, like a daydream - or a fever."

Attachment: signature.asc
Description: Digital signature

Reply via email to