#1071079 ipp-usb: Systemd service cannot be enabled manually

Package:
ipp-usb
Source:
ipp-usb
Description:
Daemon for IPP over USB printer support
Submitter:
Baptiste Jonglez
Date:
2024-05-14 07:51:07 UTC
Severity:
normal
#1071079#5
Date:
2024-05-13 20:21:30 UTC
From:
To:
Dear Maintainer,

I am running ipp-usb in a LXC container, with USB passthrough.

When starting the systemd service "ipp-usb.service" manually, everything
works fine, the printer is detected and exported over the network.

However, "ipp-usb.service" does not start automatically when booting the LXC
container.  It seems that the service is supposed to be started automatically through udev.
But udev on this system does not define ID_USB_INTERFACES, so the udev rule shipped with
ipp-usb does not match and thus does not start the service.

It is somewhat a cornercase, but I would like to be able to enable the service regardless,
and this is currently not possible:

    # systemctl enable ipp-usb.service
    The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
    Alias= settings in the [Install] section, and DefaultInstance= for template
    units). This means they are not meant to be enabled using systemctl.

Would it be possible to add the missing bits to the systemd service so that it
can be enabled?  Something like the following:

    [Install]
    WantedBy=multi-user.target

Thanks,
Baptiste

#1071079#10
Date:
2024-05-14 07:31:20 UTC
From:
To:
This is incorrect, ipp-usb is still started in udev mode, so it exits
immediately if no printer is found.  To start it in standalone mode, it
should rather be (here shown as an override):

    # /etc/systemd/system/ipp-usb.service.d/override.conf
    [Service]
    ExecStart=
    ExecStart=/sbin/ipp-usb standalone

    [Install]
    WantedBy=multi-user.target

This is better since ipp-usb will not exit immediately.  However, it
doesn't react to plugging the USB printer or starting the printer...

I'm afraid this points more at a problem with my setup, rather than a bug
in ipp-usb or the Debian packaging.  I will investigate more.

Regards,
Baptiste