kopia lustrzana https://gitlab.com/sane-project/backends
Incorporate hotplugd(8) patches from the OpenBSD port
https://cvsweb.openbsd.org/~checkout~/ports/graphics/sane-backends/patches/patch-tools_openbsd_attach?rev=1.3 https://cvsweb.openbsd.org/~checkout~/ports/graphics/sane-backends/patches/patch-tools_openbsd_detach?rev=1.2 While there, use "$()" instead of "``" for running commands in a subshell (this is to match `attach` change commited earlier). More whitespace fixes.merge-requests/213/head^2
rodzic
61881417fa
commit
a129b7767d
|
@ -11,8 +11,8 @@ case $DEVCLASS in
|
||||||
BUSNAME=$(usbdevs -vv | egrep "Controller|$DEVNAME\$" | grep -B 1 "$DEVNAME\$" | awk -F'[ :]' '/^Controller/ { print $2 }')
|
BUSNAME=$(usbdevs -vv | egrep "Controller|$DEVNAME\$" | grep -B 1 "$DEVNAME\$" | awk -F'[ :]' '/^Controller/ { print $2 }')
|
||||||
echo $BUSNAME > /var/run/${DEVNAME}.bus
|
echo $BUSNAME > /var/run/${DEVNAME}.bus
|
||||||
# probably our scanner
|
# probably our scanner
|
||||||
chgrp usb /dev/"$DEVNAME".*
|
chown _cups:_saned /dev/"$DEVNAME".*
|
||||||
chgrp usb /dev/"$BUSNAME"
|
chown _cups:_saned /dev/"$BUSNAME"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -8,15 +8,14 @@ case $DEVCLASS in
|
||||||
# generic devices
|
# generic devices
|
||||||
case "$DEVNAME" in
|
case "$DEVNAME" in
|
||||||
ugen*)
|
ugen*)
|
||||||
BUSNAME=`cat /var/run/${DEVNAME}.bus`
|
BUSNAME=$(cat /var/run/${DEVNAME}.bus)
|
||||||
rm -f /var/run/${DEVNAME}.bus
|
rm -f /var/run/${DEVNAME}.bus
|
||||||
# probably our scanner
|
# probably our scanner
|
||||||
chgrp wheel /dev/"$DEVNAME".*
|
chgrp wheel /dev/"$DEVNAME".*
|
||||||
if [ x$BUSNAME != x ] ; then
|
if [ x$BUSNAME != x ] ; then
|
||||||
chgrp wheel /dev/"$BUSNAME"
|
chown root:wheel /dev/"$BUSNAME"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
;;
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
Ładowanie…
Reference in New Issue