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

Re: removal of support for /etc/hotplug/usb/



Hi,

I've an ups (MGE Ellipse) which has an usb connection supported via nut/nut-usb.

nut-usb uses an hotplug script and usermap:
/etc/hotplug/usb/libhidups
/etc/hotplug/usb/libhid.usermap

Just after udev updrade, it stopped working.

I've reported a bug against nut-usb:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=332939

After reading this thread, I've wrote an udev rule:
# udev rules for hid ups
#
BUS!="usb", ACTION!="add", GOTO="libhidups_rules_end"

# MGE Ellipse
SYSFS{idVendor}=="0463", SYSFS{idProduct}=="ffff", RUN+="/etc/hotplug/usb/libhidups"
# other to be added
#....
LABEL=libhidups_rules_end"


lsusb returns:
[jean-luc@tangerine] % lsusb
Bus 005 Device 006: ID 0402:5635 ALi Corp.
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 003: ID 0463:ffff MGE UPS Systems UPS
Bus 002 Device 002: ID 046d:c50b Logitech, Inc.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 046d:08f0 Logitech, Inc.
Bus 001 Device 003: ID 04b8:010a Seiko Epson Corp. Perfection 1640SU
Bus 001 Device 001: ID 0000:0000

ls -l /proc/bus/usb/002/003
-rw-r--r--  1 root root 52 2005-10-12 14:09 /proc/bus/usb/002/003

The contents of /etc/hotplug/usb/libhidups is:
# This file was installed by the libhid Debian package.
#
# This script changes the permissions and ownership of a USB device under # /proc/bus/usb to grant access to this device to users in the nut group.
#
# Ownership is set to root.nut, permissions are set to 0660.
#
# Arguments :
# -----------
# ACTION=[add|remove]
# DEVICE=/proc/bus/usb/BBB/DDD
# TYPE=usb

if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then
  chown root:nut "$DEVICE"
  chmod 0660 "$DEVICE"
fi

But it seems that my rule is wong as the owner/mode of the ups device arent modified.

With a previous version I get:
-rw-rw----  1 root nut 52 2005-10-12 14:13 /proc/bus/usb/002/003

What can be wrong in what I did?

--
Regards

Jean-Luc

Attachment: pgp_jArqgTXDO.pgp
Description: PGP signature


Reply to: