xref: /third_party/backends/tools/openbsd/attach
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/backends/tools/openbsd/
1141cc406Sopenharmony_ci#!/bin/sh
2141cc406Sopenharmony_ci
3141cc406Sopenharmony_ciDEVCLASS=$1
4141cc406Sopenharmony_ciDEVNAME=$2
5141cc406Sopenharmony_ci
6141cc406Sopenharmony_cicase $DEVCLASS in
7141cc406Sopenharmony_ci0)
8141cc406Sopenharmony_ci	case "$DEVNAME" in
9141cc406Sopenharmony_ci	ugen*)
10141cc406Sopenharmony_ci		BUSNAME=$(usbdevs -vv | egrep "Controller|$DEVNAME\$" | grep -B 1 "$DEVNAME\$" | awk -F'[ :]' '/^Controller/ { print $2 }')
11141cc406Sopenharmony_ci		echo $BUSNAME > /var/run/${DEVNAME}.bus
12141cc406Sopenharmony_ci		chown _cups:_saned /dev/${DEVNAME}.* &&
13141cc406Sopenharmony_ci			chmod 660 /dev/${DEVNAME}.*
14141cc406Sopenharmony_ci		chown _cups:_saned $BUSNAME &&
15141cc406Sopenharmony_ci			chmod 660 $BUSNAME
16141cc406Sopenharmony_ci		;;
17141cc406Sopenharmony_ci	esac
18141cc406Sopenharmony_ci	;;
19141cc406Sopenharmony_ciesac
20

Indexes created Thu Nov 07 10:32:03 CST 2024