From 70fa8fbad56ae37545561423bfdab73bf70a99ce Mon Sep 17 00:00:00 2001 From: Wolfram Schlich Date: Sat, 17 Feb 2007 23:44:33 +0000 Subject: add hack for >=dev-libs/libusb-0.1.12 to udev script (Portage version: 2.1.2-r9) --- dev-libs/cyberjack/files/cyberjack.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'dev-libs/cyberjack/files') 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 -- cgit v1.2.3-65-gdbad