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/detach | |
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/detach')
-rwxr-xr-x | tools/openbsd/detach | 17 |
1 files changed, 8 insertions, 9 deletions
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 |