From 6e9c41a892ed0e0da326e0278b3221ce3f5713b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 6 Oct 2014 14:00:40 +0200 Subject: Initial import of sane-backends version 1.0.24-1.2 --- tools/openbsd/attach | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 tools/openbsd/attach (limited to 'tools/openbsd/attach') diff --git a/tools/openbsd/attach b/tools/openbsd/attach new file mode 100755 index 0000000..b6c98c8 --- /dev/null +++ b/tools/openbsd/attach @@ -0,0 +1,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 -- cgit v1.2.3