sane-backends: rebind printers to usblp after scan 8851/head
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Tue, 30 Apr 2019 04:32:59 +0000 (01:32 -0300)
committerLuiz Angelo Daros de Luca <luizluca@gmail.com>
Thu, 2 May 2019 06:31:45 +0000 (03:31 -0300)
commit7dd2e1776eef60a8a5c739b5cad67d649946d393
treea9e862e73e304706aec72d98960f6627d20276a9
parentfedc5cf5a45cd1cd6a4440724729c46d61ac3523
sane-backends: rebind printers to usblp after scan

While scanning, sane unbinds usb device from usblp module. This
patch creates a saned wrapper that keep track of all usb devices
binded to usblp before saned is launched and rebind them back
if not still bound after saned exits.

This workaround is only effective if saned is launched by a super
daemon like xinetd as it needs to exit after scan job finish. If
not, printing will not be available while saned service is running.

Write access to /sys/bus/usb/drivers/usblp/bind is required. So,
normally it would require root access.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
utils/sane-backends/Makefile
utils/sane-backends/files/etc/xinetd.d/sane-port [new file with mode: 0644]
utils/sane-backends/files/usr/sbin/saned [new file with mode: 0755]
utils/sane-backends/files/xinet.d_sane-port [deleted file]