summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Schlich <wschlich@gentoo.org>2007-02-17 23:44:33 +0000
committerWolfram Schlich <wschlich@gentoo.org>2007-02-17 23:44:33 +0000
commit70fa8fbad56ae37545561423bfdab73bf70a99ce (patch)
tree73c6eb45c462ef9c143c10b4911b54ac7d9fa44d /dev-libs/cyberjack/files
parentfix pcsc-lite usbdropdir stuff (diff)
downloadgentoo-2-70fa8fbad56ae37545561423bfdab73bf70a99ce.tar.gz
gentoo-2-70fa8fbad56ae37545561423bfdab73bf70a99ce.tar.bz2
gentoo-2-70fa8fbad56ae37545561423bfdab73bf70a99ce.zip
add hack for >=dev-libs/libusb-0.1.12 to udev script
(Portage version: 2.1.2-r9)
Diffstat (limited to 'dev-libs/cyberjack/files')
-rwxr-xr-xdev-libs/cyberjack/files/cyberjack.sh18
1 files changed, 14 insertions, 4 deletions
diff --git a/dev-libs/cyberjack/files/cyberjack.sh b/dev-libs/cyberjack/files/cyberjack.sh
index 9993dffb1fee..121e77d7197e 100755
--- a/dev-libs/cyberjack/files/cyberjack.sh
+++ b/dev-libs/cyberjack/files/cyberjack.sh
@@ -4,14 +4,24 @@ dev_mode=0664
# using the cyberJack libusb driver
if [ -n "${DEVICE}" ]; then
- dev="${DEVICE}"
+ dev="${DEVICE}"
+ # hack for >=dev-libs/libusb-0.1.12
+ # which uses /dev/bus/usb/NNN/MMM
+ # instead of /proc/bus/usb/NNN/MMM
+ case "${dev}" in
+ /proc/bus/usb/*)
+ dev="${dev} ${dev/proc/dev}"
+ ;;
+ esac
fi
# using the cyberJack kernel module
if [ -n "${DEVNAME}" ]; then
- dev="${DEVNAME}"
+ dev="${DEVNAME}"
fi
# set device group and permissions
-/bin/chgrp "${dev_group}" "${dev}"
-/bin/chmod "${dev_mode}" "${dev}"
+for d in ${dev}; do
+ /bin/chgrp "${dev_group}" "${d}"
+ /bin/chmod "${dev_mode}" "${d}"
+done