Hello folks,
I'm a new Devuan user (from Debian) from few week.
In Debian world I had a problem with my scanner, the script (run by user root) 
in /usr/local/bin/sanato solves the problem assigning group 'scanner' to device:

#!/bin/sh
line=`sane-find-scanner | grep 'found USB scanner' | sed -e 's/.*libusb://'`
if [ "$line" = "" ]; then
        echo not found
else
        line=`echo $line | sed -e 's;:;/;'`
        chgrp scanner /dev/bus/usb/$line
fi

With devuan remained the problem. Sane-utils is systemd infected and so I wrote 
a new script:

#!/bin/sh
line=`lsusb|grep "Your model"|sed -e 's/Bus \([0-9]\+\) Device 
\([0-9]\+\).\+/\1\/\2/'`
if [ "$line" = "" ]; then
        echo not found
else
        chgrp scanner /dev/bus/usb/$line
fi

Change "Your model" with your scanner.

Udev rules that run script:

# /etc/udev/rules.d/42-usb-permissions.rules
SUBSYSTEM!="usb", GOTO="end_skip_usb"

ACTION=="add", RUN+="/usr/local/bin/sanato"

LABEL="end_skip_usb"

It can serve someone.

_______________________________________________
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to