blob: b6c98c8c68e3265ad3b05e554e3dea11517c60db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
DEVCLASS=$1
DEVNAME=$2
case $DEVCLASS in
0)
# generic devices
case "$DEVNAME" in
ugen*)
BUSNAME=`usbdevs -v -d | egrep "Controller|$DEVNAME\$" | grep -B 1 ugen0$ | head -n 1 | sed -e 's,Controller ,,' -e 's,:$,,' `
echo $BUSNAME > /var/run/${DEVNAME}.bus
# probably our scanner
chgrp usb /dev/"$DEVNAME".*
chgrp usb /dev/"$BUSNAME"
;;
esac
;;
esac
|