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/detach | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'tools/openbsd/detach') diff --git a/tools/openbsd/detach b/tools/openbsd/detach index a5c209c..8566e51 100755 --- a/tools/openbsd/detach +++ b/tools/openbsd/detach @@ -5,18 +5,17 @@ DEVNAME=$2 case $DEVCLASS in 0) - # generic devices case "$DEVNAME" in ugen*) - BUSNAME=`cat /var/run/${DEVNAME}.bus` + 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 + chown root:wheel /dev/${DEVNAME}.* && + chmod 600 /dev/${DEVNAME}.* + test -n "$BUSNAME" && { + chown root:wheel $BUSNAME && + chmod 600 $BUSNAME + } ;; esac - - ;; + ;; esac -- cgit v1.2.3