From ad38bc6ecb80ddeb562841b33258dd53659b1da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 24 Aug 2020 18:44:51 +0200 Subject: New upstream version 1.0.31 --- tools/openbsd/attach | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'tools/openbsd/attach') 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 -- cgit v1.2.3