File: attach

package info (click to toggle)
sane-backends 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,552 kB
  • sloc: ansic: 418,643; cpp: 33,564; makefile: 2,502; java: 1,412; sh: 663; python: 330; awk: 83; perl: 27
file content (19 lines) | stat: -rwxr-xr-x 400 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

DEVCLASS=$1
DEVNAME=$2

case $DEVCLASS in
0)
	case "$DEVNAME" in
	ugen*)
		BUSNAME=$(usbdevs -vv | egrep "Controller|$DEVNAME\$" | grep -B 1 "$DEVNAME\$" | awk -F'[ :]' '/^Controller/ { print $2 }')
		echo $BUSNAME > /var/run/${DEVNAME}.bus
		chown _cups:_saned /dev/${DEVNAME}.* &&
			chmod 660 /dev/${DEVNAME}.*
		chown _cups:_saned $BUSNAME &&
			chmod 660 $BUSNAME
		;;
	esac
	;;
esac