:: Re: [DNG] vdev - scanner
Góra strony
Delete this message
Reply to this message
Autor: fsmithred
Data:  
Dla: dng
Temat: Re: [DNG] vdev - scanner
On 08/31/2016 11:08 AM, info at smallinnovations.nl wrote:
> On 31-08-16 16:38, fsmithred wrote:
>> On 08/31/2016 07:17 AM, fsmithred wrote:
>>> On 08/31/2016 05:03 AM, Ralph Ronnquist wrote:
>> Our discussion in irc was productive. The following works with the stock
>> permissions.sh (without the lines for setfacl). The acl does not get set,
>> but the scanner works. And if I unplug and re-plug the usb cable, the
>> scanner gets the next device number, and it works!
>>
>> cat /etc/vdev/actions/scanner.act
>>
>> [vdev-action]
>> event=add
>> path=^bus/usb/*/[001-999]
>> OS_SUBSYSTEM=usb
>> OS_TYPE=255/255/255
>> VAR_PERMISSIONS_OWNER=root
>> VAR_PERMISSIONS_GROUP=scanner
>> VAR_PERMISSIONS_MODE=0664
>> helper=permissions.sh
>> if_exists=run
>> daemonlet=true
>>
>> -fsr
>>
> And if you give the device free with a event=remove action file? Does it
> then keep it's old device number with reconnecting?
>
> Grtz
>
> Nick


I don't know. Not sure what would go in that file, either. I can test that
later. I did just try it in the system I'm using now, which is running
udev, and it gets a new number. I see that the number is now up to 36, so
that must increment every time I add/remove a usb thumb drive, scanner,
and maybe any other usb device. On this machine, the scanner is on
005/036, and there's nothing between that and 005/001. I believe that I've
plugged and removed a thumb drive around 30 times since my last reboot.

Edit: or maybe by some other logic. I just plugged in a flash drive, and
it's on 002/048

-fsr