Closed OdyX closed 3 years ago
Well, I'm not udev expert :-)
Is my understanding correct, you suggest to replace the entire content of [Service]
section with the following:
[Service]
Type=oneshot
ExecStart=/sbin/ipp-usb udev
I think the following full-file should work (note I've added the Documentation line):
[Unit]
Description=Daemon for IPP over USB printer support
Documentation=man:ipp-usb(8)
After=cups.service avahi-daemon.service
Wants=avahi-daemon.service
[Service]
Type=oneshot
ExecStart=/sbin/ipp-usb udev
The only printer I have a USB connection on is an HP LaserJet Professional P1102W, which doesn't seem to do anything with ipp-usb, so you might want to test this.
I'm currently on my countryside home, while my 25 kg weigh printer is not, so I can test on a real hardware only at the end of next week.
@tangyanli, could you please help us with testing? If yes, please replace the content of the /lib/systemd/system/ipp-usb.service
file with the content included into the previous message, and verify that ipp-usb
successfully starts when printer is connected and finishes when printer is disconnected.
This effort is a part of ipp-usb
integration into the official Debian distro.
Thanks in advance!
@alexpevzner I am glad to do it. I will commit test result here next monday (the printers are not around at the weekend)
[Test distro]: Debian10 & Fedora32 [Test Printer]: Canon MF745C, Canon MF643C [Test Result]: Plug and Unplug one USB printer: OK Plug and unplug two USB printers: OK
Thank a lot, Tess!
@OdyX, I've updated the file
Closed - fixed
When run in systemd service,
ipp-usb udev
forks in background, systemd is configured to try catching up with it by gessing it's main PID, and the type is set to forking: https://github.com/OpenPrinting/ipp-usb/blob/af7189461a8f742a830e41e4b29c225ead4b5144/systemd-udev/ipp-usb.service#L7-L9This seems overly complicated while a simple oneshot service would achieve pretty much the same effect, with additional journal support:
?