On Fri, 2013-01-11 at 08:38 -0500, Michael Watson wrote: > Louis, > > Thank you. > > When I posted the integration tweaks the service complained on startup as > simple with a dbus name. This was solved with changing the type to dbus. I > have since settled on type simple and no dbus name, and it's working fine > with no complaining. > > FYI startup and shutdown: > > /usr/lib/udev/rules.d/99-local.rules > ENV{ID_VENDOR_ID}=="04a9", ENV{ID_MODEL_ID}=="190a", ACTION=="add", > RUN+="/usr/bin/systemctl start scanbd" > ENV{SUBSYSTEM}=="usb", ENV{ID_PRODUCT_FROM_DATABASE}=="CanoScan LiDE 210", > ACTION=="remove", RUN+="/usr/bin/systemctl stop s$ > > Had to snoop the messages (udevadm monitor --property) for "remove" to sense > removal properly. This is a very nice add-on. I will have a look at it to see if this would work for me to. I will add it to the systemd integration directory
> > At the time I though scanbm.socket had to be enabled to listen. I was > wrong. I've since removed the install section and it works fine. When > working though this I found out xinetd was no longer necessary (see below > root vs saned). Archlinuxarm supports socket activation. > ok, good to see that there is consistency over different platforms and systemd versions. Thanks for the report > In summary, > > scanbd.service startup and shutdown with udev rules (scanbd.service > not enabled) Sounds pretty good. > scanbm.socket enabled > monitoring: saned Ssl /usr/local/sbin/scanbd -f > net scan: saned Ssl /usr/local/sbin/scanbd -f > root Ss /usr/local/sbin/scanbm > root Ss saned > scan by button: saned Ssl /usr/local/sbin/scanbd -f > root S /bin/bash > /usr/local/etc/scanbd/ccp2pdf.script > root S scanimage --device-name Looks ok. > genesys:libusb:001:008 --resolution ... > > xinetd started (e.g. udev rule) and scanbm.socket disabled > monitoring: saned Ssl /usr/local/sbin/scanbd -f > root Ss /usr/sbin/xinetd -dontfork > net scan: saned Ssl /usr/local/sbin/scanbd -f > root Ss /usr/sbin/xinetd -dontfork > saned Ss scanbm > saned Ss saned > scan by button: saned Ssl /usr/local/sbin/scanbd -f > root Ss /usr/sbin/xinetd -dontfork > root S /bin/bash I am not sure I understand this part: what do you use xinetd for? For scanbd it is not used at all, right? Is xinetd started by dbus on scanner detection? /systemd scanbm.socket does all you need for starting scanbm/saned for scanning. > /usr/local/etc/scanbd/ccp2pdf.script > root S scanimage --device-name > genesys:libusb:001:008 --resolution ... > > With xinetd scanbm and saned run as user saned when scanning via network. > scanbd runs as the usert set in scanbd.conf, I need to check how this works for scanbm right now. I will check later this weekend, but I guess that User and Group are missing in scanbm at .service. My bad. I will investigate this a bit further and update the examples in the svn repository Kind regards, Louis