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/detach | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 tools/openbsd/detach (limited to 'tools/openbsd/detach') diff --git a/tools/openbsd/detach b/tools/openbsd/detach new file mode 100755 index 0000000..a5c209c --- /dev/null +++ b/tools/openbsd/detach @@ -0,0 +1,22 @@ +#!/bin/sh + +DEVCLASS=$1 +DEVNAME=$2 + +case $DEVCLASS in +0) + # generic devices + case "$DEVNAME" in + ugen*) + BUSNAME=`cat /var/run/${DEVNAME}.bus` + rm -f /var/run/${DEVNAME}.bus + # probably our scanner + chgrp wheel /dev/"$DEVNAME".* + if [ x$BUSNAME != x ] ; then + chgrp wheel /dev/"$BUSNAME" + fi + ;; + esac + + ;; +esac -- cgit v1.2.3