diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-09-10 19:11:27 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-09-10 19:11:27 +0200 |
commit | 7e9455b3b15671ff99ed168638c405e2acedb6df (patch) | |
tree | 444e59ece236e09dc153f665e42160aeb0208c24 /tools/openbsd/attach | |
parent | bc8a517abd2e11e1435f4ef042cfcc8648b62ef7 (diff) | |
parent | bce41b3c37c2a68e7dab234ce0247755a61ceb40 (diff) |
Merge branch 'release/debian/1.0.31-1_experimental1' into masterdebian/1.0.31-1_experimental1
Diffstat (limited to 'tools/openbsd/attach')
-rwxr-xr-x | tools/openbsd/attach | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tools/openbsd/attach b/tools/openbsd/attach index b6c98c8..16ce31f 100755 --- a/tools/openbsd/attach +++ b/tools/openbsd/attach @@ -5,16 +5,15 @@ 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" + BUSNAME=$(usbdevs -vv | egrep "Controller|$DEVNAME\$" | grep -B 1 "$DEVNAME\$" | awk -F'[ :]' '/^Controller/ { print $2 }') + echo $BUSNAME > /var/run/${DEVNAME}.bus + chown _cups:_saned /dev/${DEVNAME}.* && + chmod 660 /dev/${DEVNAME}.* + chown _cups:_saned $BUSNAME && + chmod 660 $BUSNAME ;; esac - - ;; + ;; esac |